From: jean.pierre.pelletier0 <jean.pierre.pelletier0@gmail.com>
To: pgsql-hackers@postgresql.org
Subject: psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3
Date: Thu, 30 Aug 2018 18:30:57 -0400
Message-ID: <5b887023.1c69fb81.ff96e.6a1d@mx.google.com> (raw)
In-Reply-To: <CANGqjD=pDQqHz4oixnxcK9+LgsdXHoaTKq18SyvSUOs0nvFk4Q@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: jean.pierre.pelletier0@gmail.com
Subject: Re: psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3
In-Reply-To: <5b887023.1c69fb81.ff96e.6a1d@mx.google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox