]> git.ipfire.org Git - thirdparty/postgresql.git/commit
I started adding the Having Clause and it works quite fine for
authorBruce Momjian <bruce@momjian.us>
Mon, 30 Mar 1998 16:36:43 +0000 (16:36 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 30 Mar 1998 16:36:43 +0000 (16:36 +0000)
commitc579ce0fb03aaf92d184adf369cf13be013adf1b
tree679a8e287af5009d916fd4936483322d22375614
parent9c93fa2e4af9bb67261ecdedef2b5a97a9283f34
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!!):

Stefan
src/backend/executor/execQual.c
src/backend/executor/nodeAgg.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/setrefs.c
src/backend/parser/analyze.c
src/backend/parser/gram.c
src/backend/parser/gram.y
src/backend/parser/parse_agg.c
src/backend/rewrite/rewriteHandler.c