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

From David G. Johnston
Subject Re: Problems with question marks in operators (JDBC, ECPG, ...)
Date
Msg-id CAKFQuwag-AAxXVcCatpkYjegwpsYAkeFKL_spuXsfs_8rWjABQ@mail.gmail.com
Whole thread Raw
In response to Re: Problems with question marks in operators (JDBC, ECPG, ...)  ("Greg Sabino Mullane" <greg@turnstep.com>)
Responses Re: Problems with question marks in operators (JDBC, ECPG, ...)
List pgsql-hackers
On Sun, May 17, 2015 at 9:15 AM, Greg Sabino Mullane <greg@turnstep.com> wrote:
Dave Cramer wrote:
> 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.

That's not a good solution as '??' is a perfectly valid operator. ISTR
seeing it used somewhere in the wild, but I could be wrong.


​It which case you would write (I think, not tested and not part of the test suite that I can see...):

a ???? b ...

​There was some discussion about ?? vs \?:


I did find some alternatives discussed a couple of years back, like {postgres qm} and <operator("?")>; the later simply being to allow the operator to be quoted inside "operator()"


​The commit that added "??":


David J.

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: WALWriteLock contention
Next
From: Peter Geoghegan
Date:
Subject: Re: jsonb concatenate operator's semantics seem questionable