Re: I need to code a float with magnitude (ie unit of measure)

Lists: pgsql-hackers
From: Emilio Platzer <emilio(dot)platzer(at)ipark(dot)tv>
To: pgsql-hackers(at)postgresql(dot)org
Subject: I need to code a float with magnitude (ie unit of measure)
Date: 2009-11-13 21:20:11
Message-ID: 4AFDCD8B.9070807@ipark.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I'm apologize about my poor english

I need to a "double precision" with magniude (ie meters, kilo, dolar,
etc). And can operate with them (ie dolar+dolar=dolar or
dolar/dolar=double precision).

Do you know some pluggin or module to do this?

I can implement it but I need some examples. I try the example of
chapter "User-Defined Types" but I don't know how to compile in windows
(with MinGW). I just try some thigns that breaks postgres.exe.

Can you send me an example (with c code and makefile to see how to
compile). Simple example is ok. The Manual example is not enaugh
complete for me.

Thanks

Emilio Platzer
PD ¿Do you like to send yo some of my experiments?


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Emilio Platzer <emilio(dot)platzer(at)ipark(dot)tv>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: I need to code a float with magnitude (ie unit of measure)
Date: 2009-11-13 23:08:26
Message-ID: 25542.1258153706@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

1Emilio Platzer <emilio(dot)platzer(at)ipark(dot)tv> writes:
> I need to a "double precision" with magniude (ie meters, kilo, dolar,
> etc). And can operate with them (ie dolar+dolar=dolar or
> dolar/dolar=double precision).

> Do you know some pluggin or module to do this?

Yeah, there's a "tagged types" module on pgfoundry or someplace.
Check the list archives.

regards, tom lane