Re: Alias hstore's ? to ~ so that it works with JDBC - Mailing list pgsql-hackers

From Seamus Abshere
Subject Re: Alias hstore's ? to ~ so that it works with JDBC
Date
Msg-id 51192D7A.7070203@abshere.net
Whole thread Raw
In response to Re: Alias hstore's ? to ~ so that it works with JDBC  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2/11/13 11:30 AM, Tom Lane wrote:
> It would take extremely deep knowledge of SQL syntax for the driver to
> reliably tell the difference between a variable and an operator

Yes, auto-detecting the difference between bind vars and operators would 
probably be even more difficult than providing escapes for ?, the 
difficulty of which Kris pointed out earlier:

On 2/8/13 at 10:43AM Kris Jurka wrote:
> This will be more complicated than you might hope because the escape processing currently happens prior to bind
parameterdetection
 

The relevant section, I believe, is:

https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/core/v3/QueryExecutorImpl.java#L164

Best,
Seamus

PS. Thanks Andrew for reminding me about top-posting :)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Alias hstore's ? to ~ so that it works with JDBC
Next
From: David Fetter
Date:
Subject: Re: Department of Redundancy Department: makeNode(FuncCall) division