Greg Stark wrote:
You mean like the traditional units program available on virtually all Unix
machines?

    $ units
    2084 units, 71 prefixes, 32 nonlinear units

    You have: 1 lightyear/fortnight
    You want: m/s
            * 7.8213711e+09
            / 1.2785482e-10

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.

--
Alban Hertroys
MAG Productions

T: +31(0)53 4346874
F: +31(0)53 4346876
E: [EMAIL PROTECTED]
W: http://www.magproductions.nl

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to