| 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> |
| Subject: | Re: Numbers |
| Date: | 2006-01-22 19:25:33 |
| Message-ID: | 19883.1137957933@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Fuhr | 2006-01-22 21:43:41 | Re: Working out diskspace taken by database and tables 7.4 |
| Previous Message | Bob Pawley | 2006-01-22 18:52:12 | Numbers |