From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander H. Iliev <iliev@nimbus.dartmouth.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: question on diagnostics
Date: Thu, 01 Jun 2000 00:37:11 -0400
Message-ID: <13146.959834231@sss.pgh.pa.us> (raw)
In-Reply-To: <200006010312.XAA17634@nimbus.dartmouth.edu>
References: <200006010312.XAA17634@nimbus.dartmouth.edu>
"Alexander H. Iliev" <iliev@nimbus.dartmouth.edu> writes:
> does anyone have a clue what this diagnostic from psql (v 7.0) means:
> ERROR: aggregate function in qual must be argument of boolean operator
Aggregates and GROUP BY in views have a lot of restrictions at the
moment, and this is one of them: the rewriter has a problem with
figuring out how to substitute "MAX(date)" for "last_payment.date"
in the context of your age() function call.
We're planning a thorough rewrite of the view-supporting code for 7.2,
and most of these problems should go away at that point. In the short
run you would be well advised to avoid grouped views except in the
simplest contexts. I think this example could be rewritten with no
view, or you could push the "date_part(...)" call into the view as
another column.
> oh, btw this select refused to use an SQL natural join among the 3
> relations - the server gives up and disconnects without warning.
That sounds like a garden-variety bug. I'd be willing to look at it
if I had a complete example to follow, but I don't want to try to
reverse-engineer your table definitions...
regards, tom lane
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, iliev@nimbus.dartmouth.edu
Subject: Re: question on diagnostics
In-Reply-To: <13146.959834231@sss.pgh.pa.us>
References: <200006010312.XAA17634@nimbus.dartmouth.edu> <13146.959834231@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