Re: can not use the column after rename

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: "'salah jubeh'" <s_jubeh(at)yahoo(dot)com>, "'pgsql'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: can not use the column after rename
Date: 2011-12-21 14:00:54
Message-ID: 030d01ccbfe8$f525e100$df71a300$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of salah jubeh
Sent: Wednesday, December 21, 2011 6:39 AM
To: pgsql
Subject: [GENERAL] can not use the column after rename

Hello,

Why I can not do something like this in Postgres.

SELECT 1 as a , 2 as b , a + b as c ;

Regards

In a declarative language same-level cross-references are difficult to
process (though admittedly not impossible). What if you had written:

SELECT a + b AS c, 1 as a, 2 as b

If scanned in a linear (top-to-bottom) fashion A and B would not be defined
at the time the "a + b" part was evaluated.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message devrim 2011-12-21 14:02:26 Re: Cannot connect to 2nd cluster database remotely
Previous Message Jacques Lamothe 2011-12-21 13:56:06 Re: Cannot connect to 2nd cluster database remotely