"David G. Johnston" <david.g.johnston@gmail.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