pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: wieck@debis.com
Cc: wdemoudt@planetinternet.be
Cc: Max.Buvry@enseeiht.fr
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] subquery, except and view
Date: Thu, 09 Dec 1999 14:20:20 -0500
Message-ID: <9193.944767220@sss.pgh.pa.us> (raw)
In-Reply-To: <m11w5Tn-0003kGC@orion.SAPserv.Hamburg.dsh.de>

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



view thread (5+ messages)

Message-ID: <9193.944767220@sss.pgh.pa.us>
Permalink:  ../9193.944767220@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9193.944767220@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, wieck@debis.com, wdemoudt@planetinternet.be, Max.Buvry@enseeiht.fr
  Subject: Re: [SQL] subquery, except and view
  In-Reply-To: <9193.944767220@sss.pgh.pa.us>
  References: <m11w5Tn-0003kGC@orion.SAPserv.Hamburg.dsh.de> <9193.944767220@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox