Forum OpenACS Development: Re: db_transaction side effects

Collapse
Posted by Dave Bauer on
I wonder if

1) these nested transactions are what we really want to happen when we call TCL apis like this.

Originally you'd just call the pl/sql directly from within your on db_transaction.

Since in PG in you have nested transactions you can't really do anything useful with the information if the content::revision::new call fails, in the outer transaction, maybe we need a way to not use a transaction in content::revisioN::new if is it called within a transaction.

Maybe Don is around and can comment on that idea :)

Collapse
Posted by Nis Jørgensen on
I assume you mean "Since in PG you _don't_ have nested transactions".

I just found out that postgres 8 supports savepoints, which can be used to implement nested transactions (in fact this seems to be the standard compliant way of doing so).

/Nis

Collapse
Posted by Malte Sussdorff on
I would propose of adding a flag "no_transaction_p" to both content::revision::new and content::item::new so we can say that they should not be called with a transaction.