Re: Unit conversion database (was: multiple paramters in aggregate function)

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unit conversion database (was: multiple paramters in aggregate function)
Date: 2009-08-19 18:31:17
Message-ID: D78CA7D9-4463-4468-8562-3C2E42C9F752@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 19 Aug 2009, at 19:20, Karsten Hilbert wrote:

> Alban,
>
> I think having an installable schema for units of measure with
> definitions and functions would be a great addition to PostgreSQL.

Karsten,

Thanks for the praise and the links.

> I for one know we would use it in GNUmed (wiki.gnumed.de).
>
> A few points:
>
> Would these guys be of use as a source for reference data ?
>
> http://unitsofmeasure.org/

That looks certainly interesting, especially the fact that they
provide a source of units and conversions in an XML format. Although
their conversion formulas don't look all that easy to parse.

I've run into a few of the problems they mention already; for example
the slight differences between imperial and US units of measurement
with the same names and abbreviations...

> You may want to think about whether there's use in combining
> units with tagged types:
>
> http://svana.org/kleptog/pgsql/taggedtypes.html

Yes, I've been thinking the same thing. I had it bookmarked already
for the very purpose of checking it out and see how I could use tagged
types with units.

> There's also a Debian package which comes with a text format
> units database:
>
> http://packages.debian.org/source/sid/units
>
> The original source for that:
>
> This package was put together by me, James Troup <james(at)nocrew(dot)org>,
> from the GNU sources, which I obtained from
> sunsite.doc.ic.ac.uk:/pub/gnu/units-1.54.tar.gz.

I don't consider that tool very reliable[1]. A number of their
concepts are probably usable though. I have it's source in my source
tree (FreeBSD), so ample opportunity to peek.

[1] It doesn't correctly convert °C to °F or vv, that was one of the
first things I tried.

> The current version of the package was obtained from
> ftp://ftp.gnu.org/gnu/units
> by John Hasler, the current Debian maintainer.
>
>> I think this database is fairly usable in its current state. Any more
>> development on it
>
> Yes please ! :-)

He he, all right then! There certainly are some things left to
improve. One thing I noticed from the links you sent is that I ignored
a few units used in medicine assuming they were deprecated ages ago -
apparently not...
Then again, encouraging their usage may not be the best thing to do,
but who am I to decide what units people use eh?

>> warrants its own project page somewhere and taking
>> it off-list, I'll no longer pester you with updates on this ;)
>
> Ah, no problem. Please keep posting release announcements. Maybe
> on -announce if so.

Yes, announce would be the right place. I dislike it when people start
using this list for announcements of new versions of their software,
so let's not start doing that myself :)

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.

!DSPAM:737,4a8c44fa10131730049303!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-08-19 19:17:58 Re: Changing owner of pg_toast tables
Previous Message Tom Lane 2009-08-19 18:09:59 Re: pg_restore returns always error if backup is greater than 2 GB