Re: [SQL] subquery, except and view

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: [SQL] subquery, except and view
Дата
Msg-id
9193.944767220@sss.pgh.pa.us
Ответ на
Re: [SQL] subquery, except and view (wieck@debis.com (Jan Wieck))
Список
Дерево обсуждения
Re: [SQL] subquery, except and view De Moudt Walter <wdemoudt@planetinternet.be>
Re: [SQL] subquery, except and view wieck@debis.com (Jan Wieck)
Re: [SQL] subquery, except and view Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
>> test :>select client.num_clt, client.name from client, commamount where
>> test :>(client.num_clt = commamount.num_clt) and
>> test :>(3 > howmuch);
>> 
>> This seems to do the job perfectly. Notice the value preceeding the
>> column name in the comparison. Seems nescesary ...

>     Is  definitely  necessary,  because 'howmuch' is an aggregate
>     column  and  the  rewriter  can  only  put  that   into   the
>     qualification  if  the  aggreate  is on the right side of the
>     comparision.

BTW, this restriction is no longer true in current sources, since
single-result sub-SELECTs can now appear anywhere in an expression...
		regards, tom lane

В списке pgsql-sql по дате отправления
От: cristi voinicaru
Дата:
Сообщение: (no subject)
От: marten@feki.toppoint.de
Дата:
FAQ