title: Using query_to_xml in PostgreSQL with prepared statements
body: <p>I'm using PostgreSQL's function query_to_xml function to generate XML of a query result.</p>
  
  <pre><code>SELECT * FROM query_to_xml( 'SELECT * from some_table WHERE id = ?',true,false,'')
  </code></pre>
  
  <p>Problem is, when I use it from JDBC, with prepared Statements the '?' is ignored, so Postgres says:</p>
  
  <pre><code>"The column index is out of range..."
  </code></pre>
  
  <p>Is there any possible solution to pass parameters to such a query ?</p>