Re: Alias hstore's ? to ~ so that it works with JDBC

From: Seamus Abshere <seamus(at)abshere(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Kris Jurka <books(at)ejurka(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Alias hstore's ? to ~ so that it works with JDBC
Date: 2013-02-11 17:42:18
Message-ID: 51192D7A.7070203@abshere.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 parameter detection

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 :)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2013-02-11 18:48:38 Re: Department of Redundancy Department: makeNode(FuncCall) division
Previous Message Tom Lane 2013-02-11 17:30:50 Re: Alias hstore's ? to ~ so that it works with JDBC