Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Transaction inside of functions



Is it not possible to define  transactions inside of a function?
I guess you can do

BEGIN WORK;
select my_function()
COMMIT;

instead of defining the function
CREATE FUNCTION my_function()...
BEGIN
    BEGIN WORK;
    ....
    COMMIT;
END;

but what if you would like to do

CREATE FUNCTION my_function()...
BEGIN
    .... do stuff.....
    BEGIN WORK;
    ....
    COMMIT;
    do more stuff ....
END;



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group