title: Several close placeholders in postgres prepared statement
body: <p>I'm using Spring JbdcTemplate with Postgres. </p>
  
  <p>Stuck with a problem cause of the Postrgres JDBC internal prepared statement implemetation </p>
  
  <p>My query string is:</p>
  
  <pre><code>private static final String SELECT_ALL_PARTIALLY =
              "SELECT login, added FROM admin ORDER BY ? ? OFFSET ? LIMIT ?";
  </code></pre>
  
  <p>And I want to use it like:</p>
  
  <pre><code>List matches = getJdbcTemplate().query(SELECT_ALL_PARTIALLY,
                  (new Object[]{
                      column, // "login" or "added"
                      order,  // "asc" or "desc"
                      offset, 
                      limit
                  }),
                  new RowMapper() {
                      ...
  </code></pre>
  
  <p>The problem is with a <code>...ORDER BY ? ? OFFSET...</code> </p>
  
  <pre><code>org.postgresql.util.PSQLException: ERROR: syntax error at or near "$2"
    Position: 61
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
      at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648) ...
  </code></pre>
  
  <p>How can I separate this two placeholders or something?</p>