Search Postgresql Archives

Re: parray_gin and \d errors in PG10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Justin Pryzby <pryzby@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux