Skip site navigation (1) Skip section navigation (2)

Re: pg_dump issue : Cannot drop a non-existent(?) trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Devrim GUNDUZ <devrim(at)gunduz(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump issue : Cannot drop a non-existent(?) trigger
Date: 2005-03-25 18:38:39
Message-ID: 27986.1111775919@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Devrim GUNDUZ <devrim(at)gunduz(dot)org> writes:
> On Fri, 25 Mar 2005, Tom Lane wrote:
>> Does "\d pg_trigger" show that the tgargs column is of type bytea?

> Umm no:

> tgnargs        | smallint   | not null

tgargs, not tgnargs.

>> Also, get the OID for this pg_trigger row and see if it shows up in
>> objid or refobjid of any rows of pg_depend

> Yes it is there

> prod=# SELECT * from pg_depend WHERE objid =39053;
> - -[ RECORD 1 ]------
> classid     | 16412
> objid       | 39053
> objsubid    | 0
> refclassid  | 1259
> refobjid    | 37564
> refobjsubid | 0
> deptype     | a
> - -[ RECORD 2 ]------
> classid     | 16412
> objid       | 39053
> objsubid    | 0
> refclassid  | 1259
> refobjid    | 37577
> refobjsubid | 0
> deptype     | a

Hmph.  Those should be 'i' references to the foreign key constraint,
not 'a' references to the relations.  I suspect this database was
carried forward from an ancient (pre-7.3) dump that defined the triggers
by "CREATE CONSTRAINT TRIGGER" instead of "ALTER ADD FOREIGN KEY".
Have you ever run contrib/adddepend to update the definitions to be
proper constraints?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-03-25 19:08:48
Subject: Re: Upcoming 8.0.2 Release
Previous:From: Otto BlomqvistDate: 2005-03-25 18:29:30
Subject: Re: pg_autovacuum not having enough suction ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group