Drop all constraints

Поиск
Список
Период
Сортировка
От Gianvito Pio
Тема Drop all constraints
Дата
Msg-id 4B928400.1070709@gmail.com
обсуждение исходный текст
Ответы Re: Drop all constraints  (Andreas Kretschmer <akretschmer@spamfence.net>)
Список pgsql-sql
Hi all,
is there a way to drop all constraints of a table?

I found this workaround in the manual:

CREATE TABLE temp AS SELECT * FROM distributors;
DROP TABLE distributors;
CREATE TABLE distributors AS SELECT * FROM temp;
DROP TABLE temp;

Is there any other way to do it?
Thanks


В списке pgsql-sql по дате отправления:

Предыдущее
От: Petru Ghita
Дата:
Сообщение: Re: Does IMMUTABLE property propagate?
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Drop all constraints