agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Johnston <polobo@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Postgres behavior - Conditional statements
Date: Mon, 24 Feb 2014 12:18:09 -0500
Message-ID: <3754.1393262289@sss.pgh.pa.us> (raw)
In-Reply-To: <1393260479026-5793317.post@n5.nabble.com>
References: <CAA5_7crQLLN=Wr7gp4ykhmTZxrbtSfXjucQeoi2uyec79N1Z7Q@mail.gmail.com>
	<1905.1393257750@sss.pgh.pa.us>
	<1393260479026-5793317.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (5+ messages)  latest in thread

Message-ID: <3754.1393262289@sss.pgh.pa.us>
Permalink:  ../3754.1393262289@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3754.1393262289@sss.pgh.pa.us

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: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, polobo@yahoo.com
  Subject: Re: Postgres behavior - Conditional statements
  In-Reply-To: <3754.1393262289@sss.pgh.pa.us>

* 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