Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvkUq-0000IA-IV for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Aug 2018 14:34:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fvkUn-0005nY-QS for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Aug 2018 14:33:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvkUn-0005nQ-Fg for pgsql-hackers@lists.postgresql.org; Fri, 31 Aug 2018 14:33:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvkUk-00048h-Qa for pgsql-hackers@postgresql.org; Fri, 31 Aug 2018 14:33:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7VEXAcl027179; Fri, 31 Aug 2018 10:33:10 -0400 From: Tom Lane To: "jean.pierre.pelletier0" cc: pgsql-hackers@postgresql.org, Heikki Linnakangas 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> References: <5b887023.1c69fb81.ff96e.6a1d@mx.google.com> Comments: In-reply-to "jean.pierre.pelletier0" message dated "Thu, 30 Aug 2018 18:30:57 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27177.1535725990.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 31 Aug 2018 10:33:10 -0400 Message-ID: <27178.1535725990@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "jean.pierre.pelletier0" writes: > To reproduce, compare the output of \dC on two built-in casts(json to js= onb) and (xml to text) where only the the first is really "with inout". Hm, yeah, it just does " CASE WHEN castfunc =3D 0 THEN '(binary coerc= ible)'\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