Re: Using column aliasses in the same query - Mailing list pgsql-general

From Andrej
Subject Re: Using column aliasses in the same query
Date
Msg-id BANLkTimGr3nsM3ksurQ6Xcr_QWhWfCr5eg@mail.gmail.com
Whole thread Raw
In response to Re: Using column aliasses in the same query  (Tore Halvorsen <tore.halvorsen@gmail.com>)
Responses Re: Using column aliasses in the same query
List pgsql-general
On 18 April 2011 22:06, Tore Halvorsen <tore.halvorsen@gmail.com> 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

pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Questions about Partitioning
Next
From: SUBHAM ROY
Date:
Subject: Needs Suggestion