Re: ROLLBACK in a function?

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ROLLBACK in a function?
Date: 2003-05-28 21:28:43
Message-ID: m3brxmu5f8.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rory Campbell-Lange <rory(at)campbell-lange(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fabrizio Mazzoni 2003-05-28 21:45:58 Re: Triggers and Function's
Previous Message Ewald Geschwinde 2003-05-28 21:18:54 Re: Triggers and Function's