Re: multiple paramters in aggregate function
От
Sim Zacks
Тема
Re: multiple paramters in aggregate function
Дата
Msg-id
4A840C2B.6090309@compulab.co.il
Ответ на
Re: multiple paramters in aggregate function (Alban Hertroys)
Список
Дерево обсуждения
Re: Unit conversion database (was: multiple paramters in aggregate
function) Jasen Betts <jasen@xnet.co.nz>
Re: Re: Unit conversion database (was: multiple
paramters in aggregate function) Karsten Hilbert <Karsten.Hilbert@gmx.net>
> It's probably easiest to decide on an internal unit to use in your > aggregate and only convert it to the desired unit once you're done > summing them. I'd probably convert all measurements to mm in the > function and summarise those. That could work in some cases, however in our case it would not produce desirable results. If the user put in meters, he is expecting to see meters. My problem comes in only when the user put in values in multiple unit types, which does not happen very often. It is generally a mistake, but we would prefer to let them make the mistake and then see an irrational result and correcting it, rather then telling them they probably made a mistake. I think Scara's solution makes the most sense. It is slightly cleaner then using an array and comes up with the same result. Sim
В списке pgsql-general по дате отправления
От: Grzegorz Jaśkiewicz
Дата: