SUM()ming a view's column - Mailing list pgsql-general

From Jan Ploski
Subject SUM()ming a view's column
Date
Msg-id 1188385.988208774598.JavaMail.jpl@remotejava
Whole thread Raw
Responses Re: SUM()ming a view's column
List 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


pgsql-general by date:

Previous
From: Lieven Van Acker
Date:
Subject: Joined table view - multiple delete action rule
Next
From: Jan Wieck
Date:
Subject: Re: Joined table view - multiple delete action rule