fk constraint can't be dropped

From: "Zhang, Anna" <azhang(at)verisign(dot)com>
To: "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: fk constraint can't be dropped
Date: 2002-03-06 22:05:24
Message-ID: 5511D658682A7740BA295CCF1E1233A635A866@vsvapostal2.bkup3
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,
I created a foreign key constraint on table referral like this:

alter table referral add constraint fk_referral foreign key (handle)
references domain (handle);
create

alter table referral drop constraint fk_referral restrict;
ERROR: ALTER TABLE / DROP CONSTRAINT: fk_referral does not exist.

I am using postgres 7.2. If fk can't be dropped, what the synax: ALTER TABLE
[ ONLY ] table DROP CONSTRAINT constraint { RESTRICT | CASCADE } for in
docs? If we have to drop fk, does this mean we have to drop table and
recreate without fk? Stupid!
Anybody has an experience that droped fk succefully? Thanks!

Anna Zhang

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Chris Pesko 2002-03-06 22:25:20 production state?????/
Previous Message David Gilbert 2002-03-06 21:54:56 Re: Linux Distributions