Re: BUG #18327: Column naming inconsistency for boolean literals in ELSE clauses of CASE expressions.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18327: Column naming inconsistency for boolean literals in ELSE clauses of CASE expressions.
Дата
Msg-id 3934130.1707076663@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #18327: Column naming inconsistency for boolean literals in ELSE clauses of CASE expressions.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
"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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #18327: Column naming inconsistency for boolean literals in ELSE clauses of CASE expressions.
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18330: The query planner chooses the wrong plan when using the parallel aggregation function