From: | Jan Ploski <jpljpl(at)gmx(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: SUM()ming a view's column |
Date: | 2001-04-25 15:51:12 |
Message-ID: | 1188385.988213872922.JavaMail.jpl@remotejava |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Apr 25, 2001 at 04:26:14PM +0200, Jan Ploski wrote:
> 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.
I just upgraded to 7.1 release 1, and the problem disappeared.
Also, I found a bug in one of my own queries (a missing join
condition), but IMHO it should not have led to the anomaly pictured
above, anyway.
-JPL
From | Date | Subject | |
---|---|---|---|
Next Message | Lieven Van Acker | 2001-04-25 16:08:35 | Re: Joined table view - multiple delete action rule |
Previous Message | Doug McNaught | 2001-04-25 15:10:39 | Re: |