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 7CCF1D1B37D for ; Wed, 23 Jun 2004 18:14:59 -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 52496-08 for ; Wed, 23 Jun 2004 21:14:52 +0000 (GMT) Received: from sj-iport-4.cisco.com (sj-iport-4.cisco.com [171.68.10.86]) by svr1.postgresql.org (Postfix) with ESMTP id 89945D1B1C9 for ; Wed, 23 Jun 2004 18:14:47 -0300 (ADT) X-BrightmailFiltered: true Received: from cjwhitew2k02 (dhcp-128-107-147-47.cisco.com [128.107.147.47]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id i5NL0gZr028984; Wed, 23 Jun 2004 14:00:43 -0700 (PDT) Reply-To: From: "Chris White (cjwhite)" To: "'Tom Lane'" Cc: Subject: Re: Error when dropping table Date: Wed, 23 Jun 2004 14:01:01 -0700 Message-ID: <029c01c45965$30cda910$0200a8c0@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal In-Reply-To: <5398.1088023097@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 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/322 X-Sequence-Number: 13982 Thanks -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Wednesday, June 23, 2004 1:38 PM To: cjwhite@cisco.com Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Error when dropping table 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