On Thu, Aug 20, 2009 at 03:30:00PM +0300, Sim Zacks wrote: > In other words, I have a conversion table of all different units. If > there is no conversion between 2 units (such as volume and area) then > the sum returns null. > > > Shouldn't that return NULL IOW unknown ? > > I am not familiar with returning unknown. I know that according to the spec an > aggregate Oh, OK, I forgot about the aggregate part. > should only return null if all of its values of the aggregate are > null. If there is a way to return unknown in a non-NULL way, then that would be > preferred. I don't know of any. However, it seems patently wrong to let an integer sum()-something return 0 when some of its inputs are NULL. After all, the sum could truly have been 0. This should either throw an error, return NULL, or let me choose to ignore NULL input and return the sum of non-NULL input. But I have a feeling I am tip-toeing into a Holy War situation. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general