Search Postgresql Archives

Re: RFE: Column aliases in WHERE clauses

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

 



On Wed, Sep 19, 2012 at 11:15 PM, David Johnston <polobo@xxxxxxxxx> wrote:
> I could maybe see something like the following having some value:
>
> SELECT inverse
> FROM data
> WHERE x<>0 AND inverse > .5
> MACRO inverse (1/x)
>

WITH macros AS (SELECT *,1/x AS inverse FROM data) SELECT inverse FROM
macros WHERE x<>0 AND inverse > .5

ChrisA


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


[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