Re: pg_dump issue : Cannot drop a non-existent(?) trigger - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump issue : Cannot drop a non-existent(?) trigger
Date
Msg-id 27986.1111775919@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump issue : Cannot drop a non-existent(?) trigger  (Devrim GUNDUZ <devrim@gunduz.org>)
Responses Re: pg_dump issue : Cannot drop a non-existent(?) trigger  (Devrim GUNDUZ <devrim@gunduz.org>)
List pgsql-hackers
Devrim GUNDUZ <devrim@gunduz.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


pgsql-hackers by date:

Previous
From: Devrim GUNDUZ
Date:
Subject: Re: pg_dump issue : Cannot drop a non-existent(?) trigger
Next
From: Tom Lane
Date:
Subject: Re: Upcoming 8.0.2 Release