Mat wrote:
> org.springframework.dao.DataRetrievalFailureException: Problem executing
> statement: SELECT '?_?' as result with values [str1, str2]; nested
> exception is org.postgresql.util.PSQLException: The column index is out
> of range: 1, number of columns: 0.
Try "SELECT ? || '_' || ?"
Parameter substitution is not just substitution into the query string,
you can only put ? where it makes sense to have a selfcontained data
value. And it's definitely not going to work inside a string constant,
the driver must interpret that '?' as a literal '?' not a parameter
placeholder!
-O