ALTER TABLE RENAME and primary key

Поиск
Список
Период
Сортировка
От brian
Тема ALTER TABLE RENAME and primary key
Дата
Msg-id 457B4549.5080309@zijn-digital.com
обсуждение исходный текст
Ответы Re: ALTER TABLE RENAME and primary key  ("Raymond O'Donnell" <rod@iol.ie>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: help understanding analyze
Следующее
От: "Tom Darci"
Дата:
Сообщение: drop role with privileges