Re: [HACKERS] jsonb problematic operators

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] jsonb problematic operators
Дата
Msg-id CA+TgmoZe+9Z7Of_NsfB8k7w3WG+yCAxM=fNeKuTPvUfXO+n=BQ@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] jsonb problematic operators  (Jordan Gigov <coladict@gmail.com>)
Ответы Re: [HACKERS] jsonb problematic operators  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: [HACKERS] jsonb problematic operators  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, Dec 9, 2016 at 6:50 AM, Jordan Gigov <coladict@gmail.com> wrote:
> It's not a good idea to expect everyone else to make for workarounds
> for problems you choose to create.

True.  I actually kinda agree that the use of ? wasn't a great choice
here, precisely because a number of drivers do use it to indicate a
placeholder.  However, I also think that it was done without realizing
that it was going to create problems.  Your phrasing implies that we
did that on purpose just to mess with users, which isn't true.

As Geoff says, you don't have to use the operators; you could use the
equivalent functions instead.  Every operator just gets turned into a
function call internally, so this is always possible.

It would also be smart for driver authors who use ? to indicate a
placeholder to also provide some way of escaping it.  There are plenty
of perfectly valid PostgreSQL queries that include a ? as something
other than a driver-interpreted placeholder, and if driver authors
have failed to foresee that, it's not entirely our fault.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] pg_dump / copy bugs with "big lines" ?
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: [HACKERS] jsonb problematic operators