Re: correlated query as a column and where clause

Поиск
Список
Период
Сортировка
От salah jubeh
Тема Re: correlated query as a column and where clause
Дата
Msg-id 734987.14706.qm@web161516.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на Re: correlated query as a column and where clause  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello Tom
 
Sorry, but I did not get you. I know that the filtering in the where clause and  can be pushed up or down in the parsing tree depending on the optimizer.  So in this certain case,  the result could be computed first and filtered by the where clause later.

Regards



From: Tom Lane <tgl@sss.pgh.pa.us>
To: salah jubeh <s_jubeh@yahoo.com>
Cc: chris@chriscurvey.com; pgsql <pgsql-general@postgresql.org>
Sent: Fri, April 15, 2011 5:49:35 PM
Subject: Re: [GENERAL] correlated query as a column and where clause

salah jubeh <s_jubeh@yahoo.com> writes:
> But, why I can not  use the alias of the select statement ( as in the original
> post)  in the where clause.   

The select list can only be computed after the where clause has filtered
the rows, so such a thing would be circular.

            regards, tom lane

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

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

Предыдущее
От: Paul Millar
Дата:
Сообщение: How to silence constraint violation logging for an INSERT
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: How to silence constraint violation logging for an INSERT