Skip site navigation (1) Skip section navigation (2)

Re: Bug #735: Server crash when using dynamic SQL and disabling recursion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: katuev(at)dvbank(dot)ru, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #735: Server crash when using dynamic SQL and disabling recursion
Date: 2002-08-12 13:50:28
Message-ID: 4157.1029160228@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
pgsql-bugs(at)postgresql(dot)org writes:
> Following is the example of sql script that crashes server if you
> remove marked comments (this is not real code, just test one).
> May be i am doing something wrong???

Changing the trigger set on a relation from within a trigger on that
same relation is not a good plan.  When you return from the trigger,
the trigger-calling code is now holding a dangling pointer to
no-longer-valid trigger data.  Instant core dump.

I'm not clear on why you feel you need to do that, but I'd suggest
finding another way.  Perhaps a rule instead of a trigger?  Or redesign
your table structure to make the problem go away in the first place?

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2002-08-12 22:11:31
Subject: Bug #736: Old bug is back!! Drop database bug
Previous:From: pgsql-bugsDate: 2002-08-12 10:02:32
Subject: Bug #735: Server crash when using dynamic SQL and disabling recursion

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group