From: | "jean(dot)pierre(dot)pelletier0" <jean(dot)pierre(dot)pelletier0(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3 |
Date: | 2018-08-30 22:30:57 |
Message-ID: | 5b887023.1c69fb81.ff96e.6a1d@mx.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
To reproduce, compare the output of \dC on two built-in casts(json to jsonb) and (xml to text) where only the the first is really "with inout".
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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-08-30 22:33:15 | Re: pg_verify_checksums and -fno-strict-aliasing |
Previous Message | Peter Geoghegan | 2018-08-30 22:14:52 | Re: B-tree cache prefetches |