Transaction with in function

From: Ravi Katkar <Ravi(dot)Katkar(at)infor(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Transaction with in function
Date: 2010-05-26 04:52:22
Message-ID: 46AC8D44F3AE1F4888F137837D0DF635072561999D@INHYWEXMB2.infor.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I looking for solution for commit, rollback with in function.

Below is Example function

CREATE OR REPLACE FUNCTION test()
RETURNS void AS
$BODY$
BEGIN
--- set of statements

Commit;

-- set of statement
commit;

-- if things goes wrong
rollback

RETURN;
END; $BODY$
LANGUAGE 'plpgsql';

Thanks in advance .

Regards
Ravi Katkar

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2010-05-26 05:14:08 Re: Transaction with in function
Previous Message Mark Wong 2010-05-26 02:12:49 Fwd: PDXPUG Day at OSCON 2010