drop constraint unnamed?

Started by Andy Krigerover 23 years ago2 messagesgeneral
Jump to latest
#1Andy Kriger
akriger@greaterthanone.com

How do you drop an unnamed constraint from a table? I tried searching the
archives but the site is extremely slow and I need to get this fixed now.

I have tried
alter table table drop constraint <unnamed>;
alter table table drop constraint '<unnamed>';
alter table table drop constraint '';
alter table table drop constraint;
drop trigger triggerName from table;
drop trigger 'triggerName' from table;

Any ideas?

thx
andy

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andy Kriger (#1)
Re: drop constraint unnamed?

"Andy Kriger" <akriger@greaterthanone.com> writes:

How do you drop an unnamed constraint from a table?

Is this a foreign-key constraint? If so, you have to drop the three
triggers that implement it; see the recipe on the
techdocs.postgresql.org site.

(7.3 will have a more reasonable way to drop FK constraints ...)

regards, tom lane