Re: [HACKERS] Views on aggregates - need assistence - Mailing list pgsql-hackers

From Brett McCormick
Subject Re: [HACKERS] Views on aggregates - need assistence
Date
Msg-id 199802240459.UAA26282@abraxas.scene.com
Whole thread Raw
In response to Re: [HACKERS] Views on aggregates - need assistence  ("Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>)
List pgsql-hackers
Thank you for addressing this issue!  It has been bugging me for a
while.  Usually I just select into a new table and select from that
(but yes, it is multiple queries).  Normally I want to do something
like:

select bar,count(a.oid) as c from a,b where a.ab = b.bar and c > 1;

This actually seems to be a different issue with more complicated
unresolvable (?) problems, because you want a pre-result (per
combination of instances matched) where and a result where (per result
tuple)..  Is this possible to do using subqueries?  I'll try to find out.

This might be totally unrelated, actually.  I do not know enough about
view system to understand unresolvable conflicts.

--brett


On Tue, 24 February 1998, at 09:29:25, Vadim B. Mikheev wrote:

> create view v as select x, sum(y) as sy from A group by x;
> select * from B, V where B.z = V.sy;
>
> - how can we handle this (aggregates in WHERE) ?
> It seems that current VIEW implementation using RULEs has
> unresolvable problems :(
>
> Vadim

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/bin/initdb initdb.sh'
Next
From: Brett McCormick
Date:
Subject: Re: [HACKERS] Here it is - view permissions