Search Postgresql Archives

Re: Using column aliasses in the same query

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

 



On 18 April 2011 22:06, Tore Halvorsen <tore.halvorsen@xxxxxxxxx> wrote:

> Well, refering to the computed value may be nonsensical, but
> couldn't it be some sort of query rewrite? So that...
>
>    SELECT x/y AS z FROM tab WHERE y <> 0 AND z > 2
>
> ... is a shorthand for
>
>    SELECT x/y AS z FROM tab WHERE y <> 0 AND x/y > 2
>
> No big deal, since there are lots of other ways to do this.

That's an accurate observation, but has nothing to do w/ what
the original poster was looking for, nor does it refute Toms
argument against the OPs suggestion.


Cheers,
Andrej

-- 
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