Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

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(, min(
> 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)

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group