Search Postgresql Archives

parray_gin and \d errors in PG10

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

 



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,
                   ^
HINT:  Could not choose a best candidate operator. You might need to add explicit type casts.

[pryzbyj@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


-- 
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