pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ed Loehr <eloehr@austin.rr.com>
Cc: Alexandr Listopad <laa@laa.zp.ua>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Where is a mistake?
Date: Fri, 26 May 2000 12:03:54 -0400
Message-ID: <2269.959357034@sss.pgh.pa.us> (raw)
In-Reply-To: <392E9926.6B40AE53@austin.rr.com>
References: <Pine.BSF.4.10.10005261724210.27113-100000@Eagle.ZGIA.zp.ua>
	<392E9926.6B40AE53@austin.rr.com>

Ed Loehr <eloehr@austin.rr.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



view thread (3+ messages)

Message-ID: <2269.959357034@sss.pgh.pa.us>
Permalink:  ../2269.959357034@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2269.959357034@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, eloehr@austin.rr.com, laa@laa.zp.ua
  Subject: Re: Where is a mistake?
  In-Reply-To: <2269.959357034@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