> > The only thing I can think of is that the handling of pol X and creation
> > of pol Y from within spawn_pol() is somehow messing things up, but......
> Certainly the mere firing of a deferred trigger isn't the problem; we do
> that all the time.
Me too ;)
I was more trying to emphase the multiple select for update from both in- as
well as outside the functions, but you'd probably have caught that already if
it could have been the culprit.
> What struck me about the traceback <cut>
> Because the trigger function is plpgsql, this could happen only the
> first time the trigger is fired in a particular session
I've tried to run all immutable functions used at least once before running
the query-set, this made no difference, same error on the same location.
> (unless you are using EXECUTE to invoke the update command?)
No, no, it's a plain call.
--
Best,
Frank.