Re: [HACKERS] Views which lead to nested aggregates - Mailing list pgsql-hackers

From wieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] Views which lead to nested aggregates
Date
Msg-id m10wNh2-0003klC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Views which lead to nested aggregates  (Malcolm Beattie <mbeattie@sable.ox.ac.uk>)
Responses Re: [HACKERS] Views which lead to nested aggregates
List pgsql-hackers
Malcolm Beattie wrote:

> ...
> gives the same message. I'm not familiar with postgres internals but
> it looks as though the internal handling of views is still having
> trouble with those two levels of aggregations despite the underlying
> queries being OK. As a data point, the view creation and queries work
> fine under Informix IDS 7.3 and Sybase. Is this problem with postgres
> something which is a fixable bug, a missing feature request that is
> planned to arrive soon (maybe it's in 6.5?) or a missing feature which
> isn't going to happen any time soon?

    Up  to  now  (v6.5)  this  kind  of  nested  aggregates isn't
    supported.  Not directly over SQL, nor by views. To  be  sure
    anything  is  fine,  your  views (and however you select from
    them) should be expressable with a  regular  SELECT  too.  In
    fact  the rewrite system has to try to build such a query for
    it - so if you can't how should the rewriter can?


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: Malcolm Beattie
Date:
Subject: Views which lead to nested aggregates
Next
From: Guillaume Lairloup
Date:
Subject: ...