pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: wieck@debis.com
To: wdemoudt@planetinternet.be
Cc: Max.Buvry@enseeiht.fr
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] subquery, except and view
Date: Thu, 9 Dec 1999 16:27:39 +0100 (MET)
Message-ID: <m11w5Tn-0003kGC@orion.SAPserv.Hamburg.dsh.de> (raw)
In-Reply-To: <384F0FEF.1BF044B1@planetinternet.be>

> 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) #





view thread (5+ messages)  latest in thread

Message-ID: <m11w5Tn-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Permalink:  ../m11w5Tn-0003kGC@orion.SAPserv.Hamburg.dsh.de/
Also on:    postgresql.org/message-id/m11w5Tn-0003kGC@orion.SAPserv.Hamburg.dsh.de

 · 

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: wieck@debis.com, wdemoudt@planetinternet.be, Max.Buvry@enseeiht.fr
  Subject: Re: [SQL] subquery, except and view
  In-Reply-To: <m11w5Tn-0003kGC@orion.SAPserv.Hamburg.dsh.de>
  References: <384F0FEF.1BF044B1@planetinternet.be> <m11w5Tn-0003kGC@orion.SAPserv.Hamburg.dsh.de>

* 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