From: | David W Noon <dwnoon(at)spamtrap(dot)ntlworld(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: OT: Address Fields |
Date: | 2003-07-31 10:19:25 |
Message-ID: | e27nv-uv8.ln1@my-pc.ntlworld.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thursday 31 Jul 2003 10:39 in
<pan(dot)2003(dot)07(dot)31(dot)09(dot)39(dot)34(dot)792868(at)salterprojects(dot)com>, 2trax
(2trax(at)salterprojects(dot)com) wrote:
> It seems to me that the most flexible way is to use a text field to hold
> everything, apart from the country which suits a varchar? and perhaps have
> another dedicated varchar field to hold USA ZIP codes / UK post codes for
> easy searching?
There are ISO standard codes for countries: US, CA, GB, AU, etc. These each
fit into a fixed-width CHAR(2) field.
I would use a VARCHAR of some large size and map it into structured fields
using views. Each view is built with
WHERE country_code = 'xx'
for the matching 'xx' in the ISO standard. This will allow you to search in
a structured manner, provided you have the country code.
--
Regards,
Dave [RLU#314465]
======================================================
dwnoon(at)spamtrap(dot)ntlworld(dot)com (David W Noon)
Remove spam trap to reply via e-mail.
======================================================
From | Date | Subject | |
---|---|---|---|
Next Message | Ang Chin Han | 2003-07-31 10:42:41 | CREATE TABLE with a column of type {table name} |
Previous Message | 2trax | 2003-07-31 09:39:35 | OT: Address Fields |