Aggregates don't work on views?

From: Jeremy Buchmann <jeremy(at)wellsgaming(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Aggregates don't work on views?
Date: 2001-05-25 22:54:13
Message-ID: B73430A4.2ED5%jeremy@wellsgaming.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello all,

I am trying to select the sum of a column in a view, but it doesn't give me
any data. Check this out (h_2535c_1_this is the view):

rb=> select avg_rate from h_2535c_1_this;
avg_rate
--------
40.5
51
38
37
(4 rows)

rb=> select sum(avg_rate) from h_2535c_1_this;
sum
---




(4 rows)

What's happening here? I'm using pg 6.5.3 (yes, I know it's time to
upgrade, I will when it's feasible to take down our production server) on
Linux 2.2.19 (SuSE).

Thanks,

-- Jeremy

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2001-05-25 23:19:01 Re: Aggregates don't work on views?
Previous Message Jeff Barrett 2001-05-25 15:30:13 pqReadData() -- backend closed the channel unexpectedly.