Search Postgresql Archives

Re: Extended unit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 31, 2005 at 11:57:41AM +0100, Alban Hertroys wrote:
> Greg Stark wrote:
> >That's the program I suggested writing a function to hand this work off to
> >(presumably in the form of a dynamic library). Keep the postgres code 
> >agnostic
> >about the semantics of the units. As long as you stick to linear units then
> >Postgres can treat them as opaque strings.
> 
> Except that it also says:
> 
> 	$ units
> 	510 units, 54 prefixes
> 	You have: 1 K
> 	You want: degC
> 	        * 1
> 	        / 1
> 
> Which is incorrect, of course. Same for degrees Fahrenheit. The poor 
> command can't do baseline offsets.

Well, yes and no. As units, saying the temperature has risen by 34
Kelvin is the same as saying it has risen by 34 Celcius and is also the
same as 34*5/9 Fahrenheit. So if you're just dealing with unit
conversion it is the correct answer. The units "m^2 K" and "m^2 C" are
the same unit.

However, when people are talking about absolute temperatures you have a
problem as 1 absolute degK <> 1 absolute degC. The question is what is
the right thing for this library to do.

Hope this helps,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: pgpQBdVdn2ipX.pgp
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux