I'm replying to my own note because I figured it
out. refint.c's check_foreign_key() was saving
the plan. As a result, it appeared that a plan
already existed for performing the cascading update,
but, of course, it was the wrong plan. Please
ignore my ramblings....
Marcus Mascari (mascarim@yahoo.com)
---Marcus Mascari <mascarim@yahoo.com> wrote:
>
> Well,
>
> I attempted to modify refint.c myself to support
> cascading updates, but I'm seeing a weird affect.
> The cascing update works, except only on the first
> execution of the update. Each additional update
> doesn't cause any change to the related tables.
> If, however, I close the client, say, psql, and
> then perform another update, the trigger fires and
> the cascading update is performed.
>
> All I changed in the code was to perform an update
> with the new key values when the type was a 'c',
> cascade, for UPDATE triggers, instead of setting
> those values to NULL.
>
> Any hints?
>
> Marcus Mascari (mascarim@yahoo.com)
>
>
>
>
>
>
>
>
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com