X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 22BA2D1B289 for ; Wed, 23 Jun 2004 17:39:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27180-09 for ; Wed, 23 Jun 2004 20:39:27 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 80EE4D1B19C for ; Wed, 23 Jun 2004 17:39:23 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5NKcIud005399; Wed, 23 Jun 2004 16:38:18 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-admin@postgresql.org Subject: Re: Error when dropping table In-reply-to: <5344.1088022748@sss.pgh.pa.us> References: <028f01c45958$63e76640$0200a8c0@amer.cisco.com> <5344.1088022748@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 23 Jun 2004 16:32:28 -0400" Date: Wed, 23 Jun 2004 16:38:17 -0400 Message-ID: <5398.1088023097@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/320 X-Sequence-Number: 13980 Tom Lane writes: > "Chris White (cjwhite)" writes: >> On 7.4.2, I am trying to drop a table using the command >> drop table vm_message cascade; >> and I get the error message >> relation "vm_message" has rel_triggers = 0 > I can't find any such error message in the 7.4 sources. Oh, here it is --- should have checked the spelling of the pg_class field: elog(ERROR, "relation \"%s\" has reltriggers = 0", RelationGetRelationName(rel)); The most likely bet is that a failed pg_restore left the relation's triggers disabled. You can fix this by doing what the restore should have done: UPDATE pg_catalog.pg_class SET reltriggers = (SELECT count(*) FROM pg_catalog.pg_trigger where pg_class.oid = tgrelid) FROM pg_catalog.pg_namespace WHERE relnamespace = pg_namespace.oid AND nspname !~ '^pg_'; regards, tom lane