Forum OpenACS Q&A: Response to Adding Tables to a Portal

Collapse
Posted by Don Baccus on
It appears that manage-portal-2 is updating the same foreign key in portal_table_page_map twice within the transaction held for the duration of the loop that processes your additions/deletions to the portal page.

I believe the restriction is an ANSI SQL92 restriction.  You wouldn't see this in 6.5.3 because referential integrity wasn't implemented until PG 7.0.

To debug this, try turning on SQL logging (set "verbose" to "on") for
the relevant pool, and trace the insert and update statements within the transaction.  It should be possible to avoid the double update.

It's also possible you've uncovered a bug in the new referential integrity checking code.  It would be the first one, amazingly enough.