Re: [SQL] Drop all constraints

2010-03-06 Thread Andreas Kretschmer
Gianvito Pio wrote: > 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; I think, you can cha

[SQL] Drop all constraints

2010-03-06 Thread Gianvito Pio
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 -- Sent via pgsq