Changing primary keys - Mailing list pgsql-novice

From Carol Cheung
Subject Changing primary keys
Date
Msg-id 451AD713.1070103@consumercontact.com
Whole thread Raw
Responses Re: Changing primary keys
Re: Changing primary keys
List pgsql-novice
Hi,

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.

Thanks,
C

pgsql-novice by date:

Previous
From: developer_student
Date:
Subject: Re: Postgre cannot delete from a table
Next
From: Richard Broersma Jr
Date:
Subject: Re: Changing primary keys