Oleg Mayevskiy <[EMAIL PROTECTED]> writes: > it seems to be a simple problem, but it is not.
Yes it is ... you're expecting the RI triggers to fire during the plpgsql function, but in fact they fire at completion of the outer statement that called the plpgsql function. There's been some debate about whether this is really the most desirable behavior, but that's how it is at the moment. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html