public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: David G. Johnston <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: confusing `case when` column name
Date: Tue, 12 Mar 2024 10:19:12 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwZDiy1HPf2jy0CPr79wqZMaism3bahUV7b--oTOAJkDFA@mail.gmail.com>
References: <[email protected]>
<CAKFQuwZDiy1HPf2jy0CPr79wqZMaism3bahUV7b--oTOAJkDFA@mail.gmail.com>
"David G. Johnston" <[email protected]> writes:
> On Tuesday, March 12, 2024, [email protected] <[email protected]> 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
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: confusing `case when` column name
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox