Re: Nested Transaction TODO list
От | Honza Pazdziora |
---|---|
Тема | Re: Nested Transaction TODO list |
Дата | |
Msg-id | 20040707071622.GD11905@anxur.fi.muni.cz обсуждение исходный текст |
Ответ на | Nested Transaction TODO list (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Sat, Jul 03, 2004 at 11:03:33AM -0400, Tom Lane wrote: > than begin/commit for subxacts? What about savepoints?) Also, what about > exposing this functionality in plpgsql? Seems like we need some kind of > exception handling syntax to make this useful. What does Oracle do? Oracle uses savepoints: SAVEPOINT savepointname; creates a savepoint or shifts existing savepoint of the same name; ROLLBACK TO savepointname; rolls back to savepoint (more verbose syntax also available); The syntax of handling exceptions is (in PL/SQL): BEGIN some code, for example a bunch of SQL commands;EXCEPTION WHEN nameofexception THEN handle the exception,maybe ROLLBACK;END; There are predefined exceptions like INVALID_NUMBER, NO_DATA_FOUND, ZERO_DIVIDE, or OTHERS. -- ------------------------------------------------------------------------Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/.project:Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ... Only self-confidentpeople can be simple.
В списке pgsql-hackers по дате отправления: