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

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Problems with question marks in operators (JDBC, ECPG, ...)
Дата
Msg-id CAMkU=1yaN3jtUifuhu=PkR7JN52hOpcwF0BsdJhqHF-2+XyXBA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Problems with question marks in operators (JDBC, ECPG, ...)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, May 20, 2015 at 11:13 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Jeff Janes <jeff.janes@gmail.com> writes:
> 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 made to work?

It could be made to work, I'm sure, but I fail to see why any user
would prefer to write that over ?? or \? or {?} or pretty much any
of the other notations that've been suggested.  It's ten times as
many keystrokes ...

Because it is a completely general solution using the existing escaping infrastructure, on both ends, except for this one small exception.

It is ugly, but so is leaning toothpick syndrome where you have to escape your escapes from someone else's escapes.

Anyway, I've never looked at code written to use JDBC and thought "Boy, that sure is pretty".

Cheers,

Jeff

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: jsonb concatenate operator's semantics seem questionable