Re: phone number list - Mailing list pgsql-novice

From Bryan Irvine
Subject Re: phone number list
Date
Msg-id 1063222264.32206.12.camel@elvis
Whole thread Raw
In response to Re: phone number list  (Oliver Elphick <olly@lfix.co.uk>)
Responses Re: phone number list
Re: phone number list
List 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


pgsql-novice by date:

Previous
From: Juan Francisco Diaz
Date:
Subject: Re: RÈp. : How to opimize the
Next
From: Adrian Holovaty
Date:
Subject: Re: phone number list