Re: Alias hstore's ? to ~ so that it works with JDBC
От | Tom Lane |
---|---|
Тема | Re: Alias hstore's ? to ~ so that it works with JDBC |
Дата | |
Msg-id | 23349.1360603850@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Alias hstore's ? to ~ so that it works with JDBC (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>) |
Ответы |
Re: Alias hstore's ? to ~ so that it works with JDBC
|
Список | pgsql-hackers |
Vladimir Sitnikov <sitnikov.vladimir@gmail.com> writes: > 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. What's your point? Those cases don't have anything to do with variables versus operators, neither of which would be inside a literal or comment. It would take extremely deep knowledge of SQL syntax for the driver to reliably tell the difference between a variable and an operator --- and even then, I'm not sure it'd be terribly user-friendly, because the parsing would depend on details like where there is whitespace. For instance, the backend parser would think that "?= 2" is a prefix operator named "?=" followed by literal 2, whereas "? = 2" will be parsed differently, and "? ? 2" yet differently (because "=" is special-cased but an operator named "?" isn't). I'm not sure it'd be any more usable to work like that than with an explicit escaping convention. regards, tom lane
В списке pgsql-hackers по дате отправления: