Transaction inside of functions - Mailing list pgsql-novice

From A B
Subject Transaction inside of functions
Date
Msg-id dbbf25900805150632v58e16e0bl63a72795051a0ee0@mail.gmail.com
Whole thread Raw
Responses Re: Transaction inside of functions  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-novice
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;

pgsql-novice by date:

Previous
From: "Greg Cocks"
Date:
Subject: Re: Disadvantages to using "text" [ArcGIS]
Next
From: "A. Kretschmer"
Date:
Subject: Re: Transaction inside of functions