Re: pg_dump issue : Cannot drop a non-existent(?) trigger
От | Tom Lane |
---|---|
Тема | Re: pg_dump issue : Cannot drop a non-existent(?) trigger |
Дата | |
Msg-id | 27986.1111775919@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pg_dump issue : Cannot drop a non-existent(?) trigger (Devrim GUNDUZ <devrim@gunduz.org>) |
Ответы |
Re: pg_dump issue : Cannot drop a non-existent(?) trigger
|
Список | 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 по дате отправления: