Justin Pryzby <pry...@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

Reply via email to