Re: ROLLBACK in a function? - Mailing list pgsql-general

From Doug McNaught
Subject Re: ROLLBACK in a function?
Date
Msg-id m3brxmu5f8.fsf@varsoon.wireboard.com
Whole thread Raw
In response to ROLLBACK in a function?  (Rory Campbell-Lange <rory@campbell-lange.net>)
Responses Re: ROLLBACK in a function?
List pgsql-general
Rory Campbell-Lange <rory@campbell-lange.net> writes:

> I understand that functions provide an implied transaction in
> PostgreSQL.

Not quite.  Every SQL statement is executed in its own transaction if
BEGIN/END are not explicitly used.  A statment may cause zero, one or
many function calls, but they will all execute in that transaction.

> Does that mean one can ROLLBACK/COMMIT within the body of a
> function?

Not in current versions.

-0Doug

pgsql-general by date:

Previous
From: Ewald Geschwinde
Date:
Subject: Re: Triggers and Function's
Next
From: Hadley Willan
Date:
Subject: Re: Can anybody recommend an IDE for writing SQL/PLPSQL