SUM()ming a view's column

From: Jan Ploski <jpljpl(at)gmx(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: SUM()ming a view's column
Date: 2001-04-25 14:26:14
Message-ID: 1188385.988208774598.JavaMail.jpl@remotejava
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have run into the following problem:

workunit=> select * from v_wutest;
estimate
----------
1650
100
(2 rows)

workunit=> select sum(estimate) from v_wutest;
sum
------
4950
100
(2 rows)

Here, v_wutest is a view which returns two rows. Shouldn't the SUM
aggregate simply add these two values? To me, it looks like a bug.
Isn't it one?

I am using PostgreSQL 7.0.3 here.

-JPL

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2001-04-25 14:58:08 Re: Joined table view - multiple delete action rule
Previous Message Lieven Van Acker 2001-04-25 14:17:33 Joined table view - multiple delete action rule