pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedError when dropping table
5+ messages / 2 participants
[nested] [flat]
* Error when dropping table
@ 2004-06-23 19:29 Chris White (cjwhite) <cjwhite@cisco.com>
2004-06-23 20:32 ` Re: Error when dropping table Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Chris White (cjwhite) @ 2004-06-23 19:29 UTC (permalink / raw)
To: pgsql-admin
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
and the table is not dropped. What does this message mean and how can I
drop the table?
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error when dropping table
2004-06-23 19:29 Error when dropping table Chris White (cjwhite) <cjwhite@cisco.com>
@ 2004-06-23 20:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-06-23 20:38 ` Re: Error when dropping table Tom Lane <tgl@sss.pgh.pa.us>
2004-06-23 21:00 ` Re: Error when dropping table Chris White (cjwhite) <cjwhite@cisco.com>
0 siblings, 2 replies; 5+ messages in thread
From: Tom Lane @ 2004-06-23 20:32 UTC (permalink / raw)
To: cjwhite@cisco.com; +Cc: pgsql-admin
"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. Could we see
the exact error display with "\set VERBOSITY verbose"?
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error when dropping table
2004-06-23 19:29 Error when dropping table Chris White (cjwhite) <cjwhite@cisco.com>
2004-06-23 20:32 ` Re: Error when dropping table Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-06-23 20:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-06-23 21:01 ` Re: Error when dropping table Chris White (cjwhite) <cjwhite@cisco.com>
1 sibling, 1 reply; 5+ messages in thread
From: Tom Lane @ 2004-06-23 20:38 UTC (permalink / raw)
To: cjwhite@cisco.com; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error when dropping table
2004-06-23 19:29 Error when dropping table Chris White (cjwhite) <cjwhite@cisco.com>
2004-06-23 20:32 ` Re: Error when dropping table Tom Lane <tgl@sss.pgh.pa.us>
2004-06-23 20:38 ` Re: Error when dropping table Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-06-23 21:01 ` Chris White (cjwhite) <cjwhite@cisco.com>
0 siblings, 0 replies; 5+ messages in thread
From: Chris White (cjwhite) @ 2004-06-23 21:01 UTC (permalink / raw)
To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error when dropping table
2004-06-23 19:29 Error when dropping table Chris White (cjwhite) <cjwhite@cisco.com>
2004-06-23 20:32 ` Re: Error when dropping table Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-06-23 21:00 ` Chris White (cjwhite) <cjwhite@cisco.com>
1 sibling, 0 replies; 5+ messages in thread
From: Chris White (cjwhite) @ 2004-06-23 21:00 UTC (permalink / raw)
To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
ERROR: XX000: relation "vm_message" has rel_triggers = 0
LOCATION: RemoveTriggerById, commands/trigger.c:581
-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Wednesday, June 23, 2004 1:32 PM
To: cjwhite@cisco.com
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Error when dropping table
"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. Could we see
the exact error display with "\set VERBOSITY verbose"?
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2004-06-23 21:01 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-23 19:29 Error when dropping table Chris White (cjwhite) <cjwhite@cisco.com>
2004-06-23 20:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-06-23 20:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-06-23 21:01 ` Chris White (cjwhite) <cjwhite@cisco.com>
2004-06-23 21:00 ` Chris White (cjwhite) <cjwhite@cisco.com>
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