Re: OT: Address Fields

From: 2trax <2trax(at)salterprojects(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: OT: Address Fields
Date: 2003-08-01 01:31:19
Message-ID: pan.2003.08.01.01.31.19.453434@salterprojects.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 31 Jul 2003 11:19:25 +0100, David W Noon wrote:

> 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.

David,

Thanks for a good suggestion. I'll take a crack at it.

Cheers,

Sam.
---
Posted via news://freenews.netfront.net
Complaints to news(at)netfront(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2003-08-01 03:40:31 Re: Views With Unions
Previous Message Tom Lane 2003-08-01 00:50:50 Re: owner cant delete from table, permission denied