Re: Problems with question marks in operators (JDBC, ECPG, ...) - Mailing list pgsql-hackers

From Dave Cramer
Subject Re: Problems with question marks in operators (JDBC, ECPG, ...)
Date
Msg-id CADK3HHKVF2JwXF707S4cHPVsQ0iCYv9h2BLh2x9Dk=W-HaG4BQ@mail.gmail.com
Whole thread Raw
In response to Re: Problems with question marks in operators (JDBC, ECPG, ...)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Problems with question marks in operators (JDBC, ECPG, ...)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers

On 15 May 2015 at 16:35, Robert Haas <robertmhaas@gmail.com> wrote:
On Fri, May 15, 2015 at 4:23 PM, Dave Cramer <pg@fastcrypt.com> wrote:
>> Well, if we were to agree this was a problem, we could introduce new,
>> less-problematic operator names and then eventually deprecate the old
>> ones.  Personally, it wouldn't take a lot to convince me that if a
>> certain set of operator names is problematic for important connectors,
>> we should avoid using those and switch to other ones.  I expect others
>> on this mailing list to insist that if the connectors don't work,
>> that's the connector drivers fault for coding their connectors wrong.
>> And maybe that's the right answer, but on the other hand, maybe it's a
>> little myopic.  I think the discussion is worth having.
>
> In that case my vote is new operators. This has been a sore point for the
> JDBC driver

I guess JDBC has the same problem as Perl and JavaScript here: ?
signals a bind variable.  The next question is, why isn't there some
escaping mechanism for that, like writing ?? or \? or something?

I ask because, you know, suppose you write this:

INSERT INTO foo VALUES ('How many pickled peppers did Peter Piper pick?');

Or alternatively this:

INSERT INTO foo VALUES ($$If Peter piper picked a peck of pickled
peppers, where's the peck of pickled peppers Peter Piper picked?$$);

Those have also got question marks in them.  Do they also get
interpreted as bind variables?

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.



Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: Problems with question marks in operators (JDBC, ECPG, ...)
Next
From: Robert Haas
Date:
Subject: Re: Problems with question marks in operators (JDBC, ECPG, ...)