psql \dC incorrectly shows casts "with inout" as "binary coercible"on 9.5.14 and 11beta3
От | jean.pierre.pelletier0 |
---|---|
Тема | psql \dC incorrectly shows casts "with inout" as "binary coercible"on 9.5.14 and 11beta3 |
Дата | |
Msg-id | 5b887023.1c69fb81.ff96e.6a1d@mx.google.com обсуждение исходный текст |
Ответы |
Re: psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3
|
Список | pgsql-hackers |
To reproduce, compare the output of \dC on two built-in casts
I've been using the folllowing query which (I believe) correctly shows
the (json to jsonb) cast as "with inout"
SELECT
CONCAT('CREATE CAST (',
C.castSource::regType, ' AS ',
C.castTarget::regType,') ',
CASE c.castMethod
WHEN 'b' THEN 'WITHOUT FUNCTION'
WHEN 'f' THEN 'WITH FUNCTION ' || C.castFunc::regProc || '('
|| pg_get_function_identity_arguments(C.castFunc) || ')'
WHEN 'i' THEN 'WITH INOUT'
END,
CASE c.castContext
WHEN 'a' THEN ' AS ASSIGNMENT '
WHEN 'e' THEN ''
WHEN 'i' THEN ' AS IMPLICIT'
END)
FROM
pg_cast C
INNER JOIN pg_type TS
ON C.castSource = TS.oid
INNER JOIN pg_type TT
ON C.castTarget = TT.oid
WHERE
(C.castSource::regType::text, C.castTarget::regType::text) IN
(('json','jsonb'), ('xml','text'));
I've also noticed that pgAdmin III 1.22.2 has the same bug,
while pgAdmin 4 3.2 displays "with inout" casts properly.
Thanks,
Jean-Pierre Pelletier
В списке pgsql-hackers по дате отправления: