Re: referencing to "computed columns" in where clause - Mailing list pgsql-general

From Richard Broersma Jr
Subject Re: referencing to "computed columns" in where clause
Date
Msg-id 244522.69289.qm@web31814.mail.mud.yahoo.com
Whole thread Raw
In response to referencing to "computed columns" in where clause  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
List pgsql-general
--- On Tue, 1/29/08, Ivan Sergio Borgonovo <mail@webthatworks.it> wrote:

>> other than defining a function such that I can write:

   SELECT ( a-b ) as pippo
     FROM Yourtable
    WHERE ( a-b ) = 7
UNION ALL
   SELECT ( a*b ) as pippo
     FROM Yourtable
    WHERE ( a*b ) < 12
      AND a > 3
UNION ALL
   SELECT ( a+b ) as pippo
     FROM Yourtable
    WHERE ( a+b ) < 12
      AND a < 3;


pgsql-general by date:

Previous
From: Ivan Sergio Borgonovo
Date:
Subject: Re: referencing to "computed columns" in where clause
Next
From: Tom Lane
Date:
Subject: Re: Table has duplicate keys, what did I do