Lost Trigger(s)?

Started by Rod Taylorabout 25 years ago3 messagesgeneral
Jump to latest
#1Rod Taylor
rbt@rbt.ca

delete from user; <-- Simplest test case. Any deletion request fails
on this table.
ERROR: SPI_execp() failed in RI_FKey_cascade_del()

There are a ton of cascaded deletes that should occur from the above
deletion. Which one is failing -- how do I tell (can't seem to do any
kind of comparison against bytea fields otherwise I'd try to fish out
the 'table' entites as a start)?

Tried a few things like:

select pg_trigger.* from pg_trigger join pg_class on (tgrelid =
pg_class.oid) join pg_proc on (pg_proc.oid = tgfoid) and relname =
'user' and proname ~ 'RI_FKey_cascade_del'; (gives 9 posibilities --
only 1 of these actually has some information at this point for a
group of users I want to delete -- deleting the information from the
single table with information doesn't solve the problem)

select reltriggers from pg_class where relname = 'user'; (gives 32
triggers). All are in pg_trigger.

\d user
-> Shows me Indicies, Constraints, lack of rules (all properly).
Doesn't show any triggers..

But have come up with no obvious inconsistencies which would cause
this.

7.1 Beta 5 is the version.
--
Rod Taylor

There are always four sides to every story: your side, their side, the
truth, and what really happened.

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Rod Taylor (#1)
Re: Lost Trigger(s)?

On Thu, 22 Mar 2001, Rod Taylor wrote:

delete from user; <-- Simplest test case. Any deletion request fails
on this table.
ERROR: SPI_execp() failed in RI_FKey_cascade_del()

Hmm, that error should probably include the constraint name for the
constraint that failed.

There are a ton of cascaded deletes that should occur from the above
deletion. Which one is failing -- how do I tell (can't seem to do any
kind of comparison against bytea fields otherwise I'd try to fish out
the 'table' entites as a start)?

I'm not sure if they'll show up, but -d2 might give you more information
(showing the queries being run).

Can you create a smaller test case that exhibits the behavior? My
first guess would be that one of the parameters being passed to SPI_execp
got screwed up, but I'm not sure.

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rod Taylor (#1)
Re: Lost Trigger(s)?

"Rod Taylor" <rod.taylor@inquent.com> writes:

delete from user; <-- Simplest test case. Any deletion request fails
on this table.
ERROR: SPI_execp() failed in RI_FKey_cascade_del()

Could we see the whole schema (pg_dump -s -t tablename dbname) for
this table, and all the tables related to it by foreign keys?

regards, tom lane