Re: [GENERAL] parray_gin and \d errors in PG10 - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] parray_gin and \d errors in PG10
Date
Msg-id 28947.1508699627@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] parray_gin and \d errors in PG10  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: [GENERAL] parray_gin and \d errors in PG10  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: [GENERAL] parray_gin and \d errors in PG10
Next
From: Arthur Zakirov
Date:
Subject: Re: [GENERAL] How to get login user name and host name in pgaudit