Re: transaction in function - Mailing list pgsql-sql

From Tom Lane
Subject Re: transaction in function
Date
Msg-id 5992.1165337832@sss.pgh.pa.us
Whole thread Raw
In response to transaction in function  (Marian POPESCU <softexpert@libertysurf.fr>)
List pgsql-sql
Marian POPESCU <softexpert@libertysurf.fr> writes:
> I want to write a function that updates several tables; if there is an
> exception while updating, it should rollback the transaction and raise an
> error.

> How can this be done in pgPLSQL in PostgreSQL 8.1 ?

You just do it.  You would have to work at it to *not* have that behavior.
        regards, tom lane


pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: transaction in function
Next
From: "Collin Peters"
Date:
Subject: Question about "AT TIME ZONE"