Subject: Re: confusing `case when` column name

From: Tom Lane <[email-masked]>
Date: Tue, 12 Mar 2024 10:19:12 -0400

"David G. Johnston" <[email-masked]> writes:
> On Tuesday, March 12, 2024, [email-masked] <[email-masked]> wrote:
>> Nee we change the title of the case-when output column?

> Choosing either a or b as the label seems wrong and probably worth changing
> to something that has no meaning and encourages the application of a column
> alias.

Yeah, we won't get any kudos for changing a rule that's stood for
25 years, even if it's not very good.  This is one of the places
where it's just hard to make a great choice automatically, and
users are probably going to end up applying an AS clause most of
the time if they care about the column name at all.

			regards, tom lane