From: Chris White (cjwhite) <cjwhite@cisco.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: Error when dropping table
Date: Wed, 23 Jun 2004 14:01:01 -0700
Message-ID: <029c01c45965$30cda910$0200a8c0@amer.cisco.com> (raw)
In-Reply-To: <5398.1088023097@sss.pgh.pa.us>
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 <tgl@sss.pgh.pa.us> writes:
> "Chris White (cjwhite)" <cjwhite@cisco.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: cjwhite@cisco.com, tgl@sss.pgh.pa.us
Subject: Re: Error when dropping table
In-Reply-To: <029c01c45965$30cda910$0200a8c0@amer.cisco.com>
References: <5398.1088023097@sss.pgh.pa.us> <029c01c45965$30cda910$0200a8c0@amer.cisco.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox