Re: Postgres behavior - Conditional statements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Johnston <polobo(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Postgres behavior - Conditional statements
Date: 2014-02-24 17:18:09
Message-ID: 3754.1393262289@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

David Johnston <polobo(at)yahoo(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message AlexK 2014-02-24 17:55:03 Can I specify a copying type for an array element
Previous Message Bruce Momjian 2014-02-24 17:09:37 Re: [SQL] Comparison semantics of CHAR data type