Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 4E97E9FA03C for ; Mon, 24 Sep 2007 13:34:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 65993-09 for ; Mon, 24 Sep 2007 13:34:28 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web33511.mail.mud.yahoo.com (web33511.mail.mud.yahoo.com [68.142.206.160]) by postgresql.org (Postfix) with SMTP id 6C2079FA05C for ; Mon, 24 Sep 2007 13:34:27 -0300 (ADT) Received: (qmail 58381 invoked by uid 60001); 24 Sep 2007 16:34:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=wHc1CbMjDfMunfBUafvoC2j4KaLbJzI2Bzq1jA590pOecN81a/ADaJU/x6zJ02VOxuB7+skByzQyzelhmwkNb6K7z5p1I3QfLrR2Qhm5A0PnQN3sW8DxRZ6XCDBQIsBYCcUoaYqUNU9xnRCgLP13fdEZGba0HVaOq/V6uN3W/Ww=; X-YMail-OSG: dCS5HjwVM1m6yfI.iUHJ_dP17h2FWDlvAc1f7aC2iquv3yEzDiZJgQ7tUKR.Ht2eh5OClf_vZ.haA9YRBPIqR52nzj.TErUHMjZ5gjaH8ahPfbzyfl1VRjTdjGmHAQ-- Received: from [84.192.118.184] by web33511.mail.mud.yahoo.com via HTTP; Mon, 24 Sep 2007 09:34:26 PDT Date: Mon, 24 Sep 2007 09:34:26 -0700 (PDT) From: Michael Cochez Subject: Re: error in documentation? To: pgsql-docs@postgresql.org In-Reply-To: <1375DFC2-C35B-4B89-B26D-4031C0E14E79@macprofessionals.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-541269042-1190651666=:58158" Content-Transfer-Encoding: 8bit Message-ID: <138226.58158.qm@web33511.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/20 X-Sequence-Number: 4418 --0-541269042-1190651666=:58158 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit My reasoning was : Look to every query on a time line savepoint 1 query 1 .... savepoint j query j ..... savepoint n query n When I release savepoint j , I think 'everythin before savepoint j is ok and safe', and so I don't need the savepoints before savepoint j anymore (cause they're save) when I do a rollback to savepoint j, I say 'everything done after savepoint j is rubbish' so I don't need the savepoints after j anymore Lets say I release savepoint j, why wouldn't it make sense to go back to savepoint j+1, (a state after the state beeing released). I tought of releasing a savepoint as 'everything up to that savepoint is ok, I'm not yet shure about the queries coming next' Michael Phil Frost wrote: If I do: savepoint one; update foo set bar = 2; savepoint two; update baz set foo = 3; savepoint three; delete from foo; Why would it make sense to release "one" if i release "two"? If I release "two", then it makes sense that I can never go back to "two" or "three", but your proposed change means that if I release "two", I can later rollback to "three" but not to "one". I don't see how that's useful. Essentially what the docs say is that savepoints are created on a stack, and when you do something to to a savepoint "s", you implicitly do the same thing to all the other savepoints above "s". Or, if you think of them being nested: savepoint one { update foo set bar = 2; savepoint two { update baz set foo = 3; savepoint three { delete from foo; ... } ... } ... } then any operation on a savepoint also applies to any savepoints nested within it. --------------------------------- Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more! --0-541269042-1190651666=:58158 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit My reasoning was :
Look to every query on a time line
savepoint 1
query 1
....
savepoint j
query j
.....
savepoint n
query n

When I release savepoint j , I think 'everythin before savepoint j is ok and safe', and so I don't need the savepoints before savepoint j anymore (cause they're save) when I do a rollback to savepoint j, I say 'everything done after savepoint j is rubbish' so I don't need the savepoints after j anymore

Lets say I release savepoint j, why wouldn't it make sense to go back to savepoint j+1, (a state after the state beeing released).
I tought of releasing a savepoint as 'everything up to that savepoint is ok, I'm not yet shure about the queries coming next'

Michael

Phil Frost <phil@macprofessionals.com> wrote:

If I do:

savepoint one;
update foo set bar = 2;
savepoint two;
update baz set foo = 3;
savepoint three;
delete from foo;

Why would it make sense to release "one" if i release "two"? If I
release "two", then it makes sense that I can never go back to "two"
or "three", but your proposed change means that if I release "two", I
can later rollback to "three" but not to "one". I don't see how
that's useful.

Essentially what the docs say is that savepoints are created on a
stack, and when you do something to to a savepoint "s", you
implicitly do the same thing to all the other savepoints above "s".
Or, if you think of them being nested:

savepoint one {
update foo set bar = 2;
savepoint two {
update baz set foo = 3;
savepoint three {
delete from foo;
...
}
...
}
...
}

then any operation on a savepoint also applies to any savepoints
nested within it.


Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more! --0-541269042-1190651666=:58158--