Re: referencing to "computed columns" in where clause

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: referencing to "computed columns" in where clause
Дата
Msg-id 20080129171739.GV18990@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на referencing to "computed columns" in where clause  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Ответы Re: referencing to "computed columns" in where clause  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Список pgsql-general
On Tue, Jan 29, 2008 at 06:04:48PM +0100, Ivan Sergio Borgonovo wrote:
> select
>   case
>     when (a>3) then a*b
>     when (a<3) then a+b
>   end as pippo
> where pippo<12;

I've tended to do:

  SELECT *
  FROM (
    SELECT "complicated expression" AS pippo) x
  WHERE pippo  < 12;


  Sam

В списке pgsql-general по дате отправления:

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: referencing to "computed columns" in where clause
Следующее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: Re: referencing to "computed columns" in where clause