Unix Technical Forum

proposal: give savepoints automatic roll up ability.

This is a discussion on proposal: give savepoints automatic roll up ability. within the pgsql Hackers forums, part of the PostgreSQL category; --> Dear Hackers, In the early days of savepoints (then nested transactions), it was possible to push and pop sub-transactions ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 05:11 AM
Merlin Moncure
 
Posts: n/a
Default proposal: give savepoints automatic roll up ability.

Dear Hackers,
In the early days of savepoints (then nested transactions), it was
possible to push and pop sub-transactions in a kind of FIFO stack.
While the savepoint method certainly has its advantages, there are some
things I really miss about the old behavior, mostly because you had
finer grained control over failure behavior without resorting to client
side logic.

What about extending one of the current commands or adding a new command
that does the following:

If not in a transaction containing a savepoint, issue a warning or an
error.
If in a failed transaction containing a savepoint, rollback to the
specified (or last savepoint).
If in a valid transaction containing a savepoint, do a no-op.

esp=# begin;
BEGIN
esp=# savepoint x;
SAVEPOINT
esp=# foo;
ERROR: syntax error at or near "foo" at character 1
LINE 1: foo;
^
esp=# release x with rollback;
RELEASE
esp=# commit;
COMMIT; <-- not rollack
esp=#

ok. maybe this is another zany idea. but I really think it would be
useful for things like scripts under certain circumstances.

Merlin

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:20 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com