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 26962.1508697372@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] parray_gin and \d errors in PG10  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: [GENERAL] parray_gin and \d errors in PG10  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-general
Justin Pryzby <pryzby@telsasoft.com> writes:
> After installing parray_gin extension and pg_upgrading another instance,
> \d is failing like so:

> [pryzbyj@database ~]$ psql ts -c '\d pg_class'
> ERROR:  operator is not unique: "char"[] @> unknown
> LINE 6:   (stxkind @> '{d}') AS ndist_enabled,

Ugh.

> Thankfully this is still working:
> ts=# \do @>
> ...
>  pg_catalog | @>   | anyarray      | anyarray       | boolean     | contains
> ...
>  public     | @>   | text[]        | text[]         | boolean     | text array contains compared by strict

I'm inclined to think it wasn't very bright of parray_gin to have
installed an operator that's confusable with the builtin anyarray @>
anyarray operator.  Still, we might as well try to work around that.

> This query works fine when adding cast to text[]:

No, that will fail entirely if you don't have parray_gin installed,
because stxkind is of type "char"[], and "char"[] @> text[] will not
match the anyarray operator.  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.  In
principle this'd still match the text[] @> text[] operator, and I'm
not sure whether we have an ambiguity resolution rule that would
prefer one over the other.
        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: [GENERAL] parray_gin and \d errors in PG10
Next
From: Justin Pryzby
Date:
Subject: Re: [GENERAL] parray_gin and \d errors in PG10