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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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