Re: [HACKERS] jsonb problematic operators

Поиск
Список
Период
Сортировка
Искать
От
Merlin Moncure
Тема
Re: [HACKERS] jsonb problematic operators
Дата
Msg-id
CAHyXU0zsKfUA=0d6TYxeJcB4Z6c2p61xjobPbFgp_KhsRHQsNw@mail.gmail.com
Ответ на
Список
Дерево обсуждения
[HACKERS] jsonb problematic operators Jordan Gigov <coladict@gmail.com>
Re: [HACKERS] jsonb problematic operators Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] jsonb problematic operators Andres Freund <andres@anarazel.de>
Re: [HACKERS] jsonb problematic operators Geoff Winkless <gwinkless@gmail.com>
Re: [HACKERS] jsonb problematic operators Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] jsonb problematic operators Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] jsonb problematic operators Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] jsonb problematic operators Merlin Moncure <mmoncure@gmail.com>
Re: [HACKERS] jsonb problematic operators Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] jsonb problematic operators Greg Stark <stark@mit.edu>
Re: [HACKERS] jsonb problematic operators Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] jsonb problematic operators Nico Williams <nico@cryptonector.com>
Re: [HACKERS] jsonb problematic operators Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] jsonb problematic operators Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] jsonb problematic operators Matteo Beccati <php@beccati.com>
Re: [HACKERS] jsonb problematic operators Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] jsonb problematic operators Geoff Winkless <gwinkless@gmail.com>
Re: [HACKERS] jsonb problematic operators Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] jsonb problematic operators "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] jsonb problematic operators Geoff Winkless <pgsqladmin@geoff.dj>
Re: [HACKERS] jsonb problematic operators Merlin Moncure <mmoncure@gmail.com>
Re: [HACKERS] jsonb problematic operators "David G. Johnston" <david.g.johnston@gmail.com>
On Fri, Dec 9, 2016 at 5:50 AM, Jordan Gigov  wrote:
> There is this problem with the jsonb operators "? text" "?| text[]"
> and "?& text[]" that the question mark is typically used for prepared
> statement parameters in the most used abstraction APIs in Java and
> PHP.
>
> This really needs an alternative. Something like "HAS text", "HAS
> ANY(text[])" and "HAS ALL(text[])" same as regular array usage. It
> probably should be another word that has less chance of becoming a
> conflict with another operator in future SQL specifications, but
> that's for you to decide.
>
> It's not a good idea to expect everyone else to make for workarounds
> for problems you choose to create.

You are griping in the wrong place.  "everyone else" has reserved
characters for its own use that were not allowed to be reserved
without a clean escaping mechanism -- hibernate does this, for example
reserving ':'  which is used in many places within SQL.

Typically when you embed special characters in strings designed to be
processed by something else you allow for that character to be
directly.  In the computer science world we generally call this
escaping strings and it a very common and well understood practice.
For some odd reason however the authors of java various frameworks
seem to be impervious to the utility of the concept.

merlin


В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Pavel Stehule
Дата:
FAQ