Re: phone number list

From: Bryan Irvine <bryan(dot)irvine(at)kingcountyjournal(dot)com>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: phone number list
Date: 2003-09-10 19:31:04
Message-ID: 1063222264.32206.12.camel@elvis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


> It sounds as though you are storing the numbers in numeric fields, in
> which case store them in text fields instead.
>
> But you need to give much better information if you seriously want
> assistance. That is, you need to show us the table structure and the
> commands by which you insert a row in that table.

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)
);

And here's the insert commands:

insert into phonenumbers values (425, 333, 4297);
insert into phonenumbers values (425, 333, 4031);
insert into phonenumbers values (425, 888, 3677);
insert into phonenumbers values (425, 888, 4324);
insert into phonenumbers values (425, 888, 0773);

And here's the results of select:

dncl=# select * from phonenumbers;
areacode | prefix | suffix
----------+--------+--------
425 | 333 | 4297
425 | 333 | 4031
425 | 888 | 3677
425 | 888 | 4324
425 | 888 | 773

Any ideas? Do I need to change the format of the fields again?

--Bryan

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Adrian Holovaty 2003-09-10 19:45:27 Re: phone number list
Previous Message Juan Francisco Diaz 2003-09-10 19:13:44 Re: R=?ISO-8859-1?B?yA==?=p. : How to opimize the