Search Postgresql Archives

Re: can not use the column after rename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of salah jubeh
Sent: Wednesday, December 21, 2011 6:39 AM
To: pgsql
Subject: 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux