Skip site navigation (1) Skip section navigation (2)

Re: Error when dropping table

From: "Chris White (cjwhite)" <cjwhite(at)cisco(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Error when dropping table
Date: 2004-06-23 21:01:01
Message-ID: 029c01c45965$30cda910$ (view raw, whole thread or download thread mbox)
Lists: pgsql-admin

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
Sent: Wednesday, June 23, 2004 1:38 PM
To: cjwhite(at)cisco(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Error when dropping table 

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> "Chris White (cjwhite)" <cjwhite(at)cisco(dot)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
		elog(ERROR, "relation \"%s\" has reltriggers = 0",

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 =
FROM pg_catalog.pg_namespace 
WHERE relnamespace = pg_namespace.oid AND nspname !~ '^pg_';

			regards, tom lane

In response to

pgsql-admin by date

Next:From: P.A.M. van Dam Date: 2004-06-23 21:34:46
Subject: How to list what queries are running in postgres?
Previous:From: Chris White (cjwhite)Date: 2004-06-23 21:00:43
Subject: Re: Error when dropping table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group