From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyle <kyle@actarg.com>
To: pgsql-sql@postgresql.org
Subject: Re: A query that doesn't work on 7.1
Date: Wed, 07 Mar 2001 20:54:59 -0500
Message-ID: <24466.984016499@sss.pgh.pa.us> (raw)
In-Reply-To: <19632.984010093@sss.pgh.pa.us>
References: <3AA6C0AD.BC8A015A@actarg.com>
<19632.984010093@sss.pgh.pa.us>
>> Here's a query that doesn't work on 7.1. Is this a bug or am I doing
>> something wrong?
> Hmm, I think you have found some subtle bugs in aggregate processing;
> offhand it seems like both these queries should be legal. I'll see what
> I can do about it.
Not so subtle after all :-(. Curious that no one noticed this before.
Here's the patch if you need it right away...
regards, tom lane
inline patch 1: src/backend/optimizer/util/clauses.c (+8/-0 lines) download inline-1.patch*** src/backend/optimizer/util/clauses.c.orig Mon Feb 12 20:26:43 2001
--- src/backend/optimizer/util/clauses.c Wed Mar 7 20:49:01 2001
***************
*** 540,545 ****
--- 540,553 ----
Query *context)
{
if (node == NULL)
+ return false;+ + /*+ * If we find an aggregate function, do not recurse into its+ * arguments. Subplans invoked within aggregate calls are allowed+ * to receive ungrouped variables.+ */+ if (IsA(node, Aggref))
return false;
/*
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: tgl@sss.pgh.pa.us, kyle@actarg.com
Subject: Re: A query that doesn't work on 7.1
In-Reply-To: <24466.984016499@sss.pgh.pa.us>
References: <3AA6C0AD.BC8A015A@actarg.com> <19632.984010093@sss.pgh.pa.us> <24466.984016499@sss.pgh.pa.us>
* 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