Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rWicl-006tT7-3q for pgsql-bugs@arkaria.postgresql.org; Sun, 04 Feb 2024 19:57:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rWicj-0084SY-5J for pgsql-bugs@arkaria.postgresql.org; Sun, 04 Feb 2024 19:57:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rWici-0084R7-Se for pgsql-bugs@lists.postgresql.org; Sun, 04 Feb 2024 19:57:52 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rWicb-005Smd-Vc for pgsql-bugs@lists.postgresql.org; Sun, 04 Feb 2024 19:57:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 414Jvh6j3934131; Sun, 4 Feb 2024 14:57:43 -0500 From: Tom Lane To: "David G. Johnston" cc: work.michael.2956@gmail.com, PostgreSQL Bug List Subject: Re: BUG #18327: Column naming inconsistency for boolean literals in ELSE clauses of CASE expressions. In-reply-to: References: <18327-f25f77a50d104716@postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Sun, 04 Feb 2024 12:01:15 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3934129.1707076663.1@sss.pgh.pa.us> Date: Sun, 04 Feb 2024 14:57:43 -0500 Message-ID: <3934130.1707076663@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > This is indeed all consistent in that literals don't have names while other > expression tend to. Actually, pre-v15 the literal constants "true" and "false" do have names for this purpose. For historical reasons they were parsed into the equivalent of 't'::bool and 'f'::bool, and then the name selection rule for a typecast took effect. Starting in v15 they're treated like other sorts of literals, meaning they have no assigned name: regression=# select true; ?column? ---------- t (1 row) Many of these other examples change as a consequence. regards, tom lane