Re: dropping foreign key

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: dropping foreign key
Date: 2001-10-24 05:04:27
Message-ID: Pine.BSF.4.21.0110232203040.54194-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Tue, 23 Oct 2001, Joseph Shraibman wrote:

> I have to drop a froeign key from one of my tables. The problem is that I have another
> table that has a foreign key on the first one, so I can't do the select to temp-table
> thing and move it back.
>
> Is there any way I can remove it by mucking with pg's internal tables?

Yeah. All you should need to do is remove the three triggers that
were created for the constraint (1 on the fk table, 2 on the pk table).
You can find them in pg_trigger and you'll need to double quote the
names for the drop trigger statements because they're mixed case.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dinesh Parikh 2001-10-24 05:55:59 GUID in postgres
Previous Message Dado Feigenblatt 2001-10-24 02:18:10 Re: oid's in views.