ALTER TABLE RENAME and primary key - Mailing list pgsql-general

From brian
Subject ALTER TABLE RENAME and primary key
Date
Msg-id 457B4549.5080309@zijn-digital.com
Whole thread Raw
Responses Re: ALTER TABLE RENAME and primary key  ("Raymond O'Donnell" <rod@iol.ie>)
List pgsql-general
I'd like to rename a table but am unsure how this will affect the
primary key. That is, the table currently being named 'service', it has
a pkey named 'service_id_pkey'. I'd like to change the table name to
'service_provider' (which would mean i'd get 'service_provider_id_pkey').

There's a second table that has a foreign key constraint on
service_id_pkey, so do i need to drop that constraint first, rename the
first table, then re-create the constraint using the new pkey name?

brian

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: help understanding analyze
Next
From: "Tom Darci"
Date:
Subject: drop role with privileges