On Mon, 2002-04-29 at 17:09, Scott Marlowe wrote:
> For this reason, I propose that a transaction should "inherit" its
> environment, and that all changes EXCEPT for those affecting tuples should
> be rolled back after completion, leaving the environment the way we found
> it. If you need the environment changed, do it OUTSIDE the transaction.
Unfortunately there is no such time in postgresql where commands are
done outside transaction.
If you don't issue BEGIN; then each command is implicitly run in its own
transaction.
Rolling each command back unless it is in implicit transaction would
really confuse the user.
> I would argue that the rollback on failure / don't rollback on completion
> is actually the worse possible way to handle this, because, again, this
> isn't about data, it's about environment. And I don't think things inside
> a transaction should be mucking with the environment around them when
> they're done.
That would assume nested transactions which we don't have yet.
---------------
Hannu