Re: psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "jean(dot)pierre(dot)pelletier0" <jean(dot)pierre(dot)pelletier0(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: psql \dC incorrectly shows casts "with inout" as "binary coercible" on 9.5.14 and 11beta3
Date: 2018-08-31 14:33:10
Message-ID: 27178.1535725990@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"jean.pierre.pelletier0" <jean(dot)pierre(dot)pelletier0(at)gmail(dot)com> writes:
> 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".

Hm, yeah, it just does

" CASE WHEN castfunc = 0 THEN '(binary coercible)'\n"
" ELSE p.proname\n"
" END as \"%s\",\n"

without regard for the castmethod column (which it can't necessarily
assume is there, anyway). It's hard to be sure after all these
years whether this was intentional or just an oversight, unless maybe
Heikki remembers ... but I tend to agree that "(with inout)" would be
more apropos than "(binary coercible)".

Not sure if this rises to the level of a back-patchable bug.
People might be surprised if we change that output in minor releases.
But we could still squeeze it into v11, I think.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-08-31 14:36:37 Re: PostgreSQL logical decoder output plugin - unchanged toast data
Previous Message Adrian Klaver 2018-08-31 14:17:06 Re: pg_upgrade fails saying function unaccent(text) doesn't exist