Re: removing duplicated constraints - Mailing list pgsql-admin

From Dan Langille
Subject Re: removing duplicated constraints
Date
Msg-id 200203031611.g23GB8k64660@lists.unixathome.org
Whole thread Raw
In response to Re: removing duplicated constraints  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: removing duplicated constraints  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-admin
On 2 Mar 2002 at 23:42, Stephan Szabo wrote:

>
> > I found the list of duplicate constraints by eyeballing the files I
> > created using the methods mentioned in previous post (mainly grep and
> > sort).  Then I would search in the original dump file for the the CREATE
> > CONSTRAINT statement.  Using the name found there
> > (RI_ConstraintTrigger_998199), I did this:
> >
> >   drop TRIGGER "RI_ConstraintTrigger_998189" on categories;
> >
> > Making sense?
>
> Well, I'm not sure that you're guaranteed to get the same trigger names
> after the restore as the ones in the dump file comments.  You may have to
> look in the system table for the actual current trigger name for the
> triggers with those arguments.

There was no restore.  I did the dump in order to find the duplicates.
Then used that information to find and remove them.

cheers
--
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


pgsql-admin by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: removing duplicated constraints
Next
From: Stephan Szabo
Date:
Subject: Re: removing duplicated constraints