Re: [GENERAL] SAVEPOINT and FOR UPDATE

2006-08-07 Thread Scott Marlowe
On Fri, 2006-08-04 at 18:01, Gregory Stark wrote: Tom Lane [EMAIL PROTECTED] writes: Thomas F. O'Connell [EMAIL PROTECTED] writes: I sort of expected the release of the savepoint to be tantamount to a commit of the subtransaction, but it doesn't appear to have been. But you still

Re: [GENERAL] SAVEPOINT and FOR UPDATE

2006-08-04 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Thomas F. O'Connell [EMAIL PROTECTED] writes: I sort of expected the release of the savepoint to be tantamount to a commit of the subtransaction, but it doesn't appear to have been. But you still haven't committed the outer transaction: rolling it back

[GENERAL] SAVEPOINT and FOR UPDATE

2006-08-03 Thread Thomas F. O'Connell
I'm curious to know more about the postgres implementation of subtransactions via SAVEPOINT.If I wanted to set up a multi-statement transaction in which I needed multiple SELECT ... FOR UPDATE + UPDATE blocks, it would seem advantageous to be able to combine the SELECT ... FOR UPDATE clauses with

Re: [GENERAL] SAVEPOINT and FOR UPDATE

2006-08-03 Thread Tom Lane
Thomas F. O'Connell [EMAIL PROTECTED] writes: I sort of expected the release of the savepoint to be tantamount to a commit of the subtransaction, but it doesn't appear to have been. But you still haven't committed the outer transaction: rolling it back must undo the effects of the

Re: [GENERAL] SAVEPOINT and FOR UPDATE

2006-08-03 Thread Jeff Davis
On Thu, 2006-08-03 at 12:43 -0500, Thomas F. O'Connell wrote: I'm curious to know more about the postgres implementation of subtransactions via SAVEPOINT. Locks are held until the end of the outer transaction, see: http://www.postgresql.org/docs/8.1/static/sql-lock.html in the first