Adjust psql \d query to avoid use of @> operator.
authorTom Lane
Sun, 22 Oct 2017 20:45:16 +0000 (16:45 -0400)
committerTom Lane
Sun, 22 Oct 2017 20:45:26 +0000 (16:45 -0400)
commit852e3224e76e55f7e2046643d98d7d0786439a9c
tree709d72c263c681fcf63211ede2224bf5a82ca9cd
parent7a5f8de5525a861af5917c73e78efe15ea3e1bb2
Adjust psql \d query to avoid use of @> operator.

It seems that the parray_gin extension has seen fit to introduce a
"text[] @> text[]" operator, which conflicts with the core
"anyarray @> anyarray" operator, causing ambiguous-operator failures
if the input arguments are coercible to text[] without being exactly
that type.  This strikes me as a bad idea, but it's out there and
people use it.  As of v10, that breaks psql's query that tries to
test "pg_statistic_ext.stxkind @> '{d}'", since stxkind is char[].
The best workaround seems to be to avoid use of that operator.
We can use a scalar-vs-array test "'d' = any(stxkind)" instead;
that's arguably more readable anyway.

Per report from Justin Pryzby.  Backpatch to v10 where this
query was added.

Discussion: https://postgr.es/m/20171022181525[email protected]
src/bin/psql/describe.c