On Sunday 22 January 2006 02:47 pm, Bob Pawley wrote:
> Hi Tom
>
> I found a datatype called 'interval' which seems to separate time from its
> unit.
>
> Is that what you were thinking of??
>
> Bob
> ----- Original Message -----
> From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> To: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
> Cc: "Postgresql" <pgsql-general(at)postgresql(dot)org>
> Sent: Sunday, January 22, 2006 11:25 AM
> Subject: Re: [GENERAL] Numbers
>
> > Bob Pawley <rjpawley(at)shaw(dot)ca> writes:
> >> My initial tables have columns containing values such as 12 feet.
> >>
> >> I want to perform calculations.
> >>
> >> Is there a method in Postgresql to separate the 12 from the unit feet or
> >> am I forced to make two columns to separate the feet from the 12?
> >
> > Are you storing '12 feet' as a string? That seems awfully unstructured
> > for data that you'd like to do calculations on.
> >
> > I seem to recall that someone had come up with a datatype that would
> > store numbers with units attached, which seems like what you want here.
> > Check the PG list archives, and/or poke around on pgfoundry and gborg.
> >
> > regards, tom lane
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 9: In versions below 8.0, the planner will ignore your desire to
> > choose an index scan if your joining column's datatypes do not
> > match
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
I believe this is what Tom is talking about--
http://archives.postgresql.org/pgsql-general/2005-01/msg01646.php
--
Adrian Klaver
aklaver(at)comcast(dot)net