Re: [SQL] subquery, except and view

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wieck(at)debis(dot)com (Jan Wieck)
Cc: wdemoudt(at)planetinternet(dot)be (De Moudt Walter), Max(dot)Buvry(at)enseeiht(dot)fr, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] subquery, except and view
Date: 1999-12-09 19:20:20
Message-ID: 9193.944767220@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

wieck(at)debis(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message UEBAYASHI 'UMA' Masao 1999-12-10 06:34:10 numbered table?
Previous Message cristi voinicaru 1999-12-09 16:21:36 (no subject)