Re: Postgres behavior - Conditional statements - Mailing list pgsql-sql

From Tom Lane
Subject Re: Postgres behavior - Conditional statements
Date
Msg-id 3754.1393262289@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgres behavior - Conditional statements  (David Johnston <polobo@yahoo.com>)
Responses Re: Postgres behavior - Conditional statements
List pgsql-sql
David Johnston <polobo@yahoo.com> writes:
> Tom Lane-2 wrote
>> The behavior of CASE didn't change, but the behavior of the sub-select
>> did.

> CASE should be treated just like a function and the name of the function
> should be returned.  Arbitrarily picking the "else" branch to obtain the
> name of the result column seems somehow wrong.

[ shrug... ]  It's acted like that since roughly the late bronze age;
or to be more specific, since commit 2b189aa9537f7b4a of 1998-12-13.
Given the lack of previous complaints, it's going to take a lot more
than one man's opinion to change it.
        regards, tom lane



pgsql-sql by date:

Previous
From: David Johnston
Date:
Subject: Re: Postgres behavior - Conditional statements
Next
From: AlexK
Date:
Subject: Can I specify a copying type for an array element