Skip site navigation (1) Skip section navigation (2)

problem with the sum function

From: Marco Kienzle <m(dot)kienzle(at)marlab(dot)ac(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: problem with the sum function
Date: 2002-05-07 08:24:58
Message-ID: 1020759898.14956.12.camel@PC535 (view raw or flat)
Thread:
Lists: pgsql-bugs
The following problem occur using the sum() function (see the attached
file for all the details and an example):
	- if you use it on a portion of a table (example: table age) you get a
result that differ from the one you can get by hand (see the whole table
temp1 and do the sum by hand)
	- if you use the sum() function on the complete table (i.e. if you
first create a temporary table and then run the sum() function) then you
get the right result (see example on temp1).

Conclusion: I am not sure its really a bug but this differences can be
really misleading.

Have a nice day,
marco
-- 
____________________________________________________________________________

Marco Kienzle
Fisheries Research Services
Marine Laboratory
PO Box 101 Victoria Road
Aberdeen AB119DB
United Kingdom
 
tel: +44 (0) 1224 876544 
direct: +44 (0) 1224 295412
fax: +44 (0) 1224 295511
http://www.marlab.ac.uk

Attachment: PgBugReport.txt
Description: text/plain (8.3 KB)

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2002-05-07 13:03:12
Subject: Re: Bug #651: Time difference of 30 in while reading in timestamp
Previous:From: Hiroshi InoueDate: 2002-05-07 08:07:27
Subject: Re: Bug #657: VB DAO MoveFirst/MoveLast become invalid

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group