From: | "Rodolfo J(dot) Paiz" <rpaiz(at)simpaticus(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Storing latitude and longitude |
Date: | 2005-02-04 00:31:45 |
Message-ID: | 1107477105.7053.15.camel@rodolfo.gt.factorrent.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi:
One of my tables will store latitude and longitude information. I've
checked and I cannot see a datatype for that (which is no surprise, and
no loss). However, I can think of three ways to store the data:
* Array field (degrees, minutes, seconds)
* Three integer fields
* Three numeric fields with up to 2 decimals each
Having one-second precision is good enough, so three integers will do.
Of course, ideally I'd have two integers and a numeric for the seconds
so I could have fractional seconds too.
Between separate fields and an array, first is an array possible? Can I
store that? If so, is there any performance or other benefit I should
know about?
Clearly this is not an important consideration (in fact I already
created the table with two integers and a numeric field), but I thought
I'd ask for the educational value of the discussion.
Cheers,
--
Rodolfo J. Paiz <rpaiz(at)simpaticus(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Guerin | 2005-02-04 01:16:30 | Temp table exists test?? |
Previous Message | T- Bone | 2005-02-03 23:31:39 | Need help creating a stored procedure |