From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Dave Cramer <pg(at)fastcrypt(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Bruno Harbulot <bruno(at)distributedmatter(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Problems with question marks in operators (JDBC, ECPG, ...) |
Date: | 2015-05-15 21:04:26 |
Message-ID: | CAKFQuwY=N5kmpoDUEiT+igqBKjZGTmdegAywJeXe=dyyW4ZR_A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, May 15, 2015 at 1:45 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
> On 15 May 2015 at 16:44, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
>
>>
>>
>> On 15 May 2015 at 16:41, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>
>>> On Fri, May 15, 2015 at 4:38 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
>>> >> I don't really want to take a violently strong position on this
>>> >> without understanding what's really going on here.
>>> >>
>>> > Well our solution was to use ?? but that does mean we have to do some
>>> extra
>>> > parsing which in a perfect world wouldn't be necessary.
>>>
>>> So what about strings quoted with '' or $$ or $something$ - how would
>>> you handle those?
>>>
>>> We parse for strings; the ?? just adds to the parsing load which we
>> really try to avoid.
>>
>>
>> The ?? is just harder to deal with because ? is part of the JDBC spec as
> a placeholder
>
>>
>>
Whenever I ponder this I always come back to the idea of having a driver
(or driver mode) that integrates with the Java API that JDBC specifies but
whose parsing implementation adheres to libpq. This would, intentionally,
be a driver that could not be used with "portable" source code but would
allow people who are OK with binding tightly with PostgreSQL to talk in its
native language.
As for alternative operators maybe pgJDBC should put one or more extensions
out on PGXN that would be considered an official compatibility mode that
developers can write against and setup as dependency. Avoids each
application developing its own mapping rules and the resultant problems
that could result in doing so. At worse it at least makes the issue more
visible if done fully.
I'm not particularly in favor of deprecating the existing operators though
I haven't given it that much thought either. Since using them results in
syntax errors the harm in allowing them seems fairly minimal. The use of
"?" as an operator is normally done for solid reasons and clarity is not
something to be discarded for everyone when only a subset are affected.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2015-05-15 21:07:00 | Re: pgsql: Add pg_audit, an auditing extension |
Previous Message | Bruno Harbulot | 2015-05-15 20:58:03 | Re: Problems with question marks in operators (JDBC, ECPG, ...) |