pgsql-server: Test HAVING condition before computing targetlist of an

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: Test HAVING condition before computing targetlist of an
Date: 2004-07-10 18:39:45
Message-ID: 20040710183945.1B9BDD1B285@svr1.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Test HAVING condition before computing targetlist of an Aggregate node.
This is required by SQL spec to avoid failures in cases like
SELECT sum(win)/sum(lose) FROM ... GROUP BY ... HAVING sum(lose) > 0;
AFAICT we have gotten this wrong since day one. Kudos to Holger Jakobs
for being the first to notice.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
pgsql-server/src/backend/executor:
nodeAgg.c (r1.116.2.1 -> r1.116.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/executor/nodeAgg.c.diff?r1=1.116.2.1&r2=1.116.2.2)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2004-07-10 22:58:42 pgsql-server: Fix BSD-only coding in port.c (passing a local variable to
Previous Message Tom Lane 2004-07-10 18:39:23 pgsql-server: Test HAVING condition before computing targetlist of an