From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Alexander H(dot) Iliev" <iliev(at)nimbus(dot)dartmouth(dot)edu> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: question on diagnostics |
Date: | 2000-06-01 04:37:11 |
Message-ID: | 13146.959834231@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
"Alexander H. Iliev" <iliev(at)nimbus(dot)dartmouth(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander H. Iliev | 2000-06-01 05:07:26 | Re: question on diagnostics |
Previous Message | Alexander H. Iliev | 2000-06-01 03:12:54 | question on diagnostics |