Re: Where is a mistake?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
Cc: Alexandr Listopad <laa(at)laa(dot)zp(dot)ua>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Where is a mistake?
Date: 2000-05-26 16:03:54
Message-ID: 2269.959357034@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Ed Loehr <eloehr(at)austin(dot)rr(dot)com> writes:
>> I have PGSQL v 6.5.3.

> Mistake #1: using 6.5.3 instead of 7.0 :)

Check --- 7.0 has a lot of bugfixes in this area.

> Mistake #2: aggregates are not supported in views :(

Not so much aggregates as GROUP BY. In this case he's attempting to do
two levels of aggregation and grouping, one in the view and the other
in the calling SELECT. There's no way to make that work in the current
implementation of views, because it can't be rewritten into a single
legal-SQL statement. I trust that 7.0 won't crash, but it will tell you
it can't do it.

We're planning to fix this for 7.2, by redoing the querytree
representation so that views can be handled as separate processing steps
in a pipeline, rather than as a rule that transforms the original query.
It's not a small job though :-(

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Oliver Elphick 2000-05-26 19:34:41 Re: importing from other dbases
Previous Message Ed Loehr 2000-05-26 15:32:54 Re: Where is a mistake?