Trigger Blunder

Started by Nonameabout 25 years ago3 messagesgeneral
Jump to latest
#1Noname
ryan@paymentalliane.net

I had smoe truggers I wanted to get rid of - instead of doing a DROP
TRIGGER sql command, I deleted the trigger records from the pg_trigger
table.... it was late.... i don't know what I was thinking!

Anyhow - now when I try to delete anything from these tables, or
delete the tables themself I get the message:

RelationBuildTriggers: 1 record(s) not found for rel tablename

Any suggestions on how I can deal with this other than recreating the
entire DB? Or restoring from backup?

Thanks

Ryan Mahoney

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: Trigger Blunder

ryan@paymentalliane.net writes:

I had smoe truggers I wanted to get rid of - instead of doing a DROP
TRIGGER sql command, I deleted the trigger records from the pg_trigger
table.... it was late.... i don't know what I was thinking!

Anyhow - now when I try to delete anything from these tables, or
delete the tables themself I get the message:

RelationBuildTriggers: 1 record(s) not found for rel tablename

Reset the "reltriggers" count (field in pg_class) to zero for each
affected table.

regards, tom lane

#3Jan Wieck
JanWieck@Yahoo.com
In reply to: Tom Lane (#2)
Re: Trigger Blunder

Tom Lane wrote:

ryan@paymentalliane.net writes:

I had smoe truggers I wanted to get rid of - instead of doing a DROP
TRIGGER sql command, I deleted the trigger records from the pg_trigger
table.... it was late.... i don't know what I was thinking!

Anyhow - now when I try to delete anything from these tables, or
delete the tables themself I get the message:

RelationBuildTriggers: 1 record(s) not found for rel tablename

Reset the "reltriggers" count (field in pg_class) to zero for each
affected table.

Better reset it to the number of triggers that remained on
each class.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com