On Fri, May 15, 2015 at 9:41 PM, Robert Haas <robertmh...@gmail.com> wrote:
> On Fri, May 15, 2015 at 4:38 PM, Dave Cramer <p...@fastcrypt.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? > I hadn't realised that the JDBC driver allowed the ? operator to be escaped as ??. It seems to work indeed (at least with version 9.4-1201 of the JDBC driver). $$....?$$ also works. I guess the JDBC drivers tries to parse literals first and escapes them accordingly. That said, I'd still suggest providing new operators and deprecating the ones containing a question mark if possible. (There are 8 distinct operator names like this: "?-", "?&", "?", "?#", "?||", "?-|", "?|" and "<?>".) I think it would be nicer to have a single mechanism that can be used consistently across multiple languages (?? doesn't work for ECPG, for example), considering that ? as a placeholder seems quite common. Best wishes, Bruno.