Re: [GENERAL] parray_gin and \d errors in PG10

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] parray_gin and \d errors in PG10
Дата
Msg-id 28947.1508699627@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] parray_gin and \d errors in PG10  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: [GENERAL] parray_gin and \d errors in PG10  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Justin Pryzby <pryzby@telsasoft.com> writes:
> On Sun, Oct 22, 2017 at 02:36:12PM -0400, Tom Lane wrote:
>> ...  Possibly we could use
>> (stxkind @> '{d}'::pg_catalog."char"[])
>> That works for me without parray_gin installed, but I wonder whether
>> it fails due to ambiguity if you do have parray_gin installed.

> [ yup ]

Bleah.

One option is to use OPERATOR(pg_catalog.@>), which aside from being
really ugly, isn't a complete fix because it still wouldn't work if
someone had decided to install parray_gin into the pg_catalog schema.

Or maybe what we should do is to avoid @> in favor of using

('d' = any(stxkind))

That's a bit less nice because it doesn't generalize as cheaply to
looking for multiple stxkind values, but since this query has no
current need for that, maybe it's fine.

Anyway, the fact that this is such a mess points up why trying to
alias polymorphic operators isn't such a hot idea.  parray_gin
really ought to get rid of that operator.
        regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: [GENERAL] parray_gin and \d errors in PG10
Следующее
От: Arthur Zakirov
Дата:
Сообщение: Re: [GENERAL] How to get login user name and host name in pgaudit