Re: Adding foreign key performance - Mailing list pgsql-performance

From Bruce Momjian
Subject Re: Adding foreign key performance
Date
Msg-id 200310281913.h9SJDvN28840@candle.pha.pa.us
Whole thread Raw
In response to Re: Adding foreign key performance  ("John K. Herreshoff" <jkherr@centurytel.net>)
List pgsql-performance
John K. Herreshoff wrote:
> That did not take long... about 13 minutes to reload the tables from an *.mdb
> file, and a second or two for each of the 'alter table foo add foreign
> key...' lines.  I tried to drop a 'referencing' table, and the database would
> not let me, said that something depended on it ;o)
>
> Is there some way to name the foreign key so that it can be dropped later, or
> is there a way to drop the foreign key using information already in the
> database?

You have to use ALTER TABLE DROP CONSTRAINT perhaps.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-performance by date:

Previous
From: Vivek Khera
Date:
Subject: Re: Adding foreign key performance
Next
From: Jeff
Date:
Subject: Re: Adding foreign key performance