Re: [SQL] subquery, except and view

Поиск
Список
Период
Сортировка
От wieck@debis.com (Jan Wieck)
Тема Re: [SQL] subquery, except and view
Дата
Msg-id m11w5Tn-0003kGC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [SQL] subquery, except and view  (De Moudt Walter <wdemoudt@planetinternet.be>)
Ответы Re: [SQL] subquery, except and view  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
> 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.

    At the time I added this  capability  at  all,  the  operator
    catalog   was   in   a   much   too   bad   state   WRT   the
    commutator/negator information. Otherwise I would  have  made
    the rewriter automatically swap it for you.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #

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

Предыдущее
От: wieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [SQL] timestamp/now in views
Следующее
От: cristi voinicaru
Дата:
Сообщение: (no subject)