Re: Added Having Clause

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: ssimkovi(at)ag(dot)or(dot)at (Stefan Simkovics)
Cc: stefan(at)stefan(dot)co(dot)at, hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: Re: Added Having Clause
Date: 1998-03-30 16:36:02
Message-ID: 199803301636.LAA14220@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Applied.

This adds HAVING to the system, and is our first contribution from
Stefan, who is doing his thesis on adding ANSI features to PostgreSQL.
(Stefan, correct me if I am wrong on this.) He plans to finish by June.

>
> Hi!
>
> I started adding the Having Clause and it works quite fine for
> sequential scans! (I think it will also work with hash, index, etc but
> I did not check it out! I made some High level changes which should
> work for all access methods, but maybe I'm wrong. Please let me know.)
>
> Now it is possible to make queries like:
>
> select s.sname, max(p.pid), min(p.pid)
> from part p, supplier s
> where s.sid=p.sid
> group by s.sname
> having max(pid)=6 and min(pid)=1 or avg(pid)=4;
>
> Having does not work yet for queries that contain a subselect statement
> in the Having clause, I'll try to fix this in the next days.
>
> If there are some bugs, please let me know, I'll start to read the
> mailinglists now!
>
> Now here is the patch against the original 6.3 version (no snapshot!!):
>
> It is encoded using uuencode and called:
> postgresql-6.3.tar.gz_to_having.diff.gz.uu
>
> If your original 6.3 source tree is in:
> tmp/postgresql-6.3/
> perform the following steps to apply the patch:
>
> $ cd tmp/
> $ uudecode postgresql-6.3.tar.gz_to_having.diff.gz.uu
> $ gunzip postgresql-6.3.tar.gz_to_having.diff.gz
> $ patch < postgresql-6.3.tar.gz_to_having.diff
>
> Hopefully you will see only "Hunk succeeded..." messages :-)
>
> Regards
>
> Stefan
>

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-03-30 16:41:10 Re: [PORTS] Pgaccess doesn't run on -current anymore, Update (fwd)
Previous Message Thomas G. Lockhart 1998-03-30 16:17:17 Re: [DOCS] Reference Manual