> The table 'house' was created with the below code (partial)
>
> CREATE TABLE house (
> house_id bigserial unique not null,
> phone bigint not null,
> address varchar(75) not null,
> primary key(phone, address)
> );
>
> My question is how can I switch the primary key from (phone, address) to
> house_id, now that the table is created and records have been inserted.
http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html
You will need to determine the name of your primary key constraint so that you can drop it using
the alter table syntax. I believe that "$> \d+ house" will do this for you.
Next you can create the new primary key constraint following the sytanx in the link.
Regards,
Richard Broersma Jr.