Drop all constraints - Mailing list pgsql-sql

From Gianvito Pio
Subject Drop all constraints
Date
Msg-id 4B928400.1070709@gmail.com
Whole thread Raw
Responses Re: Drop all constraints  (Andreas Kretschmer <akretschmer@spamfence.net>)
List 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 by date:

Previous
From: Petru Ghita
Date:
Subject: Re: Does IMMUTABLE property propagate?
Next
From: Andreas Kretschmer
Date:
Subject: Re: Drop all constraints