From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | work(dot)michael(dot)2956(at)gmail(dot)com, PostgreSQL Bug List <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #18327: Column naming inconsistency for boolean literals in ELSE clauses of CASE expressions. |
Date: | 2024-02-04 19:57:43 |
Message-ID: | 3934130.1707076663@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2024-02-04 20:35:02 | BUG #18330: The query planner chooses the wrong plan when using the parallel aggregation function |
Previous Message | David G. Johnston | 2024-02-04 19:01:15 | Re: BUG #18327: Column naming inconsistency for boolean literals in ELSE clauses of CASE expressions. |