Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-20 Thread Bruno Harbulot
On Tue, May 19, 2015 at 9:51 PM, Dave Cramer p...@fastcrypt.com wrote: Actually the issue is what to do about a number of connectors which use a fairly standard '?' as a placeholder. Notably absent from the discussion is ODBC upon which JDBC was modelled and probably predates any use of ?

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-20 Thread Bruno Harbulot
On Wed, May 20, 2015 at 7:04 PM, Jeff Janes jeff.ja...@gmail.com wrote: What if something like this was made to work? select '{3:5}'::jsonb operator(pg_catalog.?) '3'; (Where the double quotes around the ? would be tolerated, which they currently are not) Is there a reason it can't be

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-20 Thread Bruno Harbulot
On Wed, May 20, 2015 at 5:46 PM, Robert Haas robertmh...@gmail.com wrote: I think we should be more focused on this part of the issue. It seems to me that it's a good idea for connectors to have an escaping mechanism. Pretty much any syntax that supports funny characters that do magical

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-20 Thread Bruno Harbulot
On Tue, May 19, 2015 at 10:31 PM, Greg Sabino Mullane g...@turnstep.com wrote: If you are running into situations where you have question mark operators in your queries, you have already lost the query abstraction battle. There will be no seamless switching if you are using jsonb, hstore,

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-19 Thread Bruno Harbulot
On Tue, May 19, 2015 at 3:23 PM, Kevin Grittner kgri...@ymail.com wrote: David G. Johnston david.g.johns...@gmail.com wrote: On Mon, May 18, 2015 at 3:31 PM, Bruno Harbulot br...@distributedmatter.netwrote: In the discussion on the OpenJDK JDBC list two years ago ( http

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-19 Thread Bruno Harbulot
On Tue, May 19, 2015 at 9:50 PM, David G. Johnston david.g.johns...@gmail.com wrote: On Tue, May 19, 2015 at 1:36 PM, Kevin Grittner kgri...@ymail.com wrote: Gavin Flower gavinflo...@archidevsys.co.nz wrote: I prefer the $1 approach, others can't use that, and there are situations where

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-19 Thread Bruno Harbulot
On Tue, May 19, 2015 at 6:15 PM, Mike Blackwell mike.blackw...@rrd.com wrote: A Google search suggests Oracle 9.x supports a unary '?' operator (fuzzy match), so the use of '?' in an operator name is not without precedent. Interesting. Do you have any specific link? I'm probably not using the

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-19 Thread Bruno Harbulot
On Tue, May 19, 2015 at 7:51 PM, Greg Sabino Mullane g...@turnstep.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Dave Cramer opined: It would seem that choosing ? for operators was ill advised; I'm not convinced that deprecating them is a bad idea. If we start now, in 5

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-19 Thread Bruno Harbulot
On Tue, May 19, 2015 at 8:04 PM, Greg Sabino Mullane g...@turnstep.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Bruno Harbulot asked for a devil's advocate by saying: My main point was that this is not specific to JDBC. Considering that even PostgreSQL's own ECPG

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-15 Thread Bruno Harbulot
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

[HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-15 Thread Bruno Harbulot
Hello, I've been trying to use the new JSONB format using JDBC, and ran into trouble with the question mark operators (?, ?| and ?). I realise there has already been a discussion about this (actually, it was about hstore, not jsonb, but that's more or less the same problem): -