Postgres uses ? as an operator; may its JDBC driver allow escaping?
Lance Andersen - Oracle
Lance.Andersen at oracle.com
Mon Feb 11 12:11:20 PST 2013
There is nothing in the SQL standard that would support the use of an '?' as anything but a parameter marker. While you may be able to make this work with just a Statement object, when you get to a PreparedStatement, I am not sure how you will be able to support this as an operator as there is no way in the SQL standard to escape the '?' as a parameter marker.
On Feb 11, 2013, at 2:45 PM, Lance Andersen - Oracle wrote:
> Forwarding while I get the moderator password sorted out
> ----------------------
>
> hi,
>
> Is there any language in the JDBC spec that disallows Postgres's JDBC driver from supporting
>
> SELECT * FROM foo WHERE bar ? 'baz'
>
> ... given that ? in this case is an operator and not a placeholder for a bind variable?
>
> The discussion on pgsql-hackers [1] led to a question on StackOverflow [2], where Mark Rotteveel suggested that I ask jdbc-spec-discuss (greetings!)
>
> Best,
> Seamus
>
> [1] http://www.postgresql.org/message-id/alpine.BSO.2.00.1302081134320.15260@leary.csoft.net
> [2] http://stackoverflow.com/questions/14779896/does-the-jdbc-spec-prevent-from-being-used-as-an-operator-outside-of-quotes
>
> --
> Seamus Abshere
> seamus at abshere.net
> https://github.com/seamusabshere
>
> Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering
> 1 Network Drive
> Burlington, MA 01803
> Lance.Andersen at oracle.com
>
-------------- next part --------------
Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com
More information about the jdbc-spec-discuss
mailing list