From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | parray_gin and \d errors in PG10 |
Date: | 2017-10-22 18:15:25 |
Message-ID: | 20171022181525.GA21884@telsasoft.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
After installing parray_gin extension and pg_upgrading another instance,
\d is failing like so:
[pryzbyj(at)database ~]$ psql ts -c '\d pg_class'
ERROR: operator is not unique: "char"[] @> unknown
LINE 6: (stxkind @> '{d}') AS ndist_enabled,
^
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
[pryzbyj(at)database ~]$ psql ts -c '\d pg_class' -E
[...]
********* QUERY **********
SELECT oid, stxrelid::pg_catalog.regclass, stxnamespace::pg_catalog.regnamespace AS nsp, stxname,
(SELECT pg_catalog.string_agg(pg_catalog.quote_ident(attname),', ')
FROM pg_catalog.unnest(stxkeys) s(attnum)
JOIN pg_catalog.pg_attribute a ON (stxrelid = a.attrelid AND
a.attnum = s.attnum AND NOT attisdropped)) AS columns,
(stxkind @> '{d}') AS ndist_enabled,
(stxkind @> '{f}') AS deps_enabled
FROM pg_catalog.pg_statistic_ext stat WHERE stxrelid = '1259'
ORDER BY 1;
**************************
ERROR: operator is not unique: "char"[] @> unknown
LINE 6: (stxkind @> '{d}') AS ndist_enabled,
^
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
Thankfully this is still working:
ts=# \do @>
List of operators
Schema | Name | Left arg type | Right arg type | Result type | Description
------------+------+---------------+----------------+-------------+----------------------------------------
pg_catalog | @> | aclitem[] | aclitem | boolean | contains
pg_catalog | @> | anyarray | anyarray | boolean | contains
pg_catalog | @> | anyrange | anyelement | boolean | contains
pg_catalog | @> | anyrange | anyrange | boolean | contains
pg_catalog | @> | box | box | boolean | contains
pg_catalog | @> | box | point | boolean | contains
pg_catalog | @> | circle | circle | boolean | contains
pg_catalog | @> | circle | point | boolean | contains
pg_catalog | @> | jsonb | jsonb | boolean | contains
pg_catalog | @> | path | point | boolean | contains
pg_catalog | @> | polygon | point | boolean | contains
pg_catalog | @> | polygon | polygon | boolean | contains
pg_catalog | @> | tsquery | tsquery | boolean | contains
public | @> | hstore | hstore | boolean |
public | @> | text[] | text[] | boolean | text array contains compared by strict
(15 rows)
This query works fine when adding cast to text[]:
ts=# SELECT oid, stxrelid::pg_catalog.regclass, stxnamespace::pg_catalog.regnamespace AS nsp, stxname,
(SELECT pg_catalog.string_agg(pg_catalog.quote_ident(attname),', ')
FROM pg_catalog.unnest(stxkeys) s(attnum)
JOIN pg_catalog.pg_attribute a ON (stxrelid = a.attrelid AND
a.attnum = s.attnum AND NOT attisdropped)) AS columns,
(stxkind @> '{d}'::text[]) AS ndist_enabled,
(stxkind @> '{f}'::text[]) AS deps_enabled
FROM pg_catalog.pg_statistic_ext stat WHERE stxrelid = '1259'
ORDER BY 1;
oid | stxrelid | nsp | stxname | columns | ndist_enabled | deps_enabled
-----+----------+-----+---------+---------+---------------+--------------
(0 rows)
Is this to be considered an issue with parray_gin or with psql ?
I don't think that's an urgent problem to fix, but if someone has a workaround
for \d I would appreciate if you'd pass it along :)
Thanks in advance
Justin
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-10-22 18:36:12 | Re: parray_gin and \d errors in PG10 |
Previous Message | Francisco Olarte | 2017-10-22 17:09:21 | Re: Re: Restoring tables with circular references dumped to separate files |