Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Transaction ins...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3111 of 3323
Post > Topic >>

Transaction inside of functions

by gentosaker@[EMAIL PROTECTED] ("A B") May 15, 2008 at 03:32 PM

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;

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 1 Posts in Topic:
Transaction inside of functions
gentosaker@[EMAIL PROTECT  2008-05-15 15:32:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 6:18:37 CST 2008.