Re: [HACKERS] jsonb problematic operators

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: [HACKERS] jsonb problematic operators
Дата
Msg-id CAMsr+YH5XkKpAndb9jMLtz4EuctR4H7UmqeN5EQsE1-R8oVpdg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] jsonb problematic operators  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] jsonb problematic operators  (Greg Stark <stark@mit.edu>)
Re: [HACKERS] jsonb problematic operators  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
On 12 December 2016 at 12:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Craig Ringer <craig@2ndquadrant.com> writes:
>> It's definitely annoying, in both directions. ? wasn't a great choice
>> for an operator character but it's logical and was grandfathered over
>> from hstore.
>
> It was grandfathered from a lot further back than that.  A quick look
> into the system catalogs says that core Postgres currently has 21
> operators that include "?" in their names.  Three of those are the
> jsonb operators, and the other 18 have been there since circa 1997.
> (Most of them seem to date to Tom Lockhart's commit 3c2d74d2a, but
> "<?>" is present in Berkeley Postgres v4r2, released in 1994.)
>
> I do not have a lot of patience with client-side code that's unable
> to deal with operator names containing "?".  It's not like this
> requirement has blindsided anybody in this century.

Pretty much. Nor is it the only oddity you have to deal with when
working with different DBMSes.

PgJDBC allows you to write ??, which is ugly, but tolerable, since the
JDBC spec doesn't have an escape syntax for it. We could've extended
the JDBC escape syntax with a new kind of {postgres } escape if we'd
wanted instead, but it'd still be nonportable so the driver went for
the less verbose option. PDO should do something similar. It's not
like client code using our ? operators has to be portable.

I didn't realise Pg's use of ? was that old, so thanks. That makes
offering alternatives much less appealing.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Hash Indexes
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] [COMMITTERS] pgsql: Implement table partitioning.