Re: Alias hstore's ? to ~ so that it works with JDBC
От | Vladimir Sitnikov |
---|---|
Тема | Re: Alias hstore's ? to ~ so that it works with JDBC |
Дата | |
Msg-id | CAB=Je-GqF3JuvNWpiVFeu-6yzBpYDQqY0JK1TMxjZi9PJGBTug@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Alias hstore's ? to ~ so that it works with JDBC (Dave Cramer <pg@fastcrypt.com>) |
Ответы |
Re: Alias hstore's ? to ~ so that it works with JDBC
|
Список | pgsql-hackers |
The thing is PostgeSQL JDBC driver should be able to parse sql in order to tell if specific question mark is a bind variable or it is inside string literal, or it is inside of some comment.
I do not believe JDBC spec forces to treat all ? as bind placeholders. That's unusable.
Oracle JDBC allows having ? symbols in comments and string literals without any special escapement.
08.02.2013 22:01 пользователь "Dave Cramer" <pg@fastcrypt.com> написал:
That would seem to be the implication. JDBC wouldn't really know anything about hstore.On Fri, Feb 8, 2013 at 12:51 PM, Andrew Dunstan <andrew@dunslane.net> wrote:I assume, though, that you're not talking about something that's hstore-specific, but rather something that will allow the user to put a non-parameter question mark in the query string. As has been noted upthread, the hstore use is far from the only one that causes users to trip on this.
On 02/08/2013 12:41 PM, Kris Jurka wrote:
On Fri, 8 Feb 2013, Dave Cramer wrote:Would this be an postgresql specific escape sequence ? I don't think theYes, this would be a postgresql jdbc driver specific escape. The spec
spec allows for this does it ?
doesn't have a concept of private escape sequences, but that doesn't seem
like the end of the world. Clearly the user here is writing postgresql
specific code to use hstore operators, so there's not a portability loss
here.
cheers
andrew
В списке pgsql-hackers по дате отправления: