From: Gianvito Pio <pio.gianvito@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Drop all constraints
Date: Sat, 06 Mar 2010 17:34:08 +0100
Message-ID: <4B928400.1070709@gmail.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pio.gianvito@gmail.com
Subject: Re: Drop all constraints
In-Reply-To: <4B928400.1070709@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox