Re: phone number list

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Bryan Irvine <bryan(dot)irvine(at)kingcountyjournal(dot)com>
Cc: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, pgsql-novice(at)postgresql(dot)org
Subject: Re: phone number list
Date: 2003-09-10 20:28:10
Message-ID: 20030910202810.GB30774@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, Sep 10, 2003 at 12:31:04 -0700,
Bryan Irvine <bryan(dot)irvine(at)kingcountyjournal(dot)com> wrote:
>
> I dropped the db and recreated the fields using varchar as Louise
> suggested. Here are the commands I'm using to create the tables:
>
> create table phonenumbers (
> areacode varchar(3),
> prefix varchar(3),
> suffix varchar(4)
> );

I don't think you want to do it that way. If you are just handling
North American numbers without extensions then the area code is
exactly 3 digits, not up to 3 digits. The same applies for what you
call the prefix and suffix.

If you are handling international numbers than you don't want to limit
the number of digits in each section because different countries do
different things (some don't have area or city codes). You will also
need have a location for the country code. (For NA the country code
is '1'.)

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Louise Cofield 2003-09-10 20:28:48 Macro substitution in Postgres
Previous Message Adrian Holovaty 2003-09-10 19:45:27 Re: phone number list