From: | Din Adrian <adrian(dot)din(at)easynet(dot)ro> |
---|---|
To: | "Marian POPESCU" <softexpert(at)libertysurf(dot)fr>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: transaction in function |
Date: | 2006-12-05 20:32:16 |
Message-ID: | op.tj3sn2cmawcxfg@adin |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Any function runs into a single transaction so you don't need to worry
about rolling back on exceptions - this is the standard behavior. If there
is an exception while running any statement inside the function it's
rolls back automatically.
On Tue, 05 Dec 2006 17:25:31 +0200, Marian POPESCU
<softexpert(at)libertysurf(dot)fr> wrote:
> Hi,
>
> 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 ?
>
> Thank you for helping me out on this one !
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Ray | 2006-12-05 20:33:01 | Can someone explain the problem with this select |
Previous Message | Collin Peters | 2006-12-05 20:29:26 | Question about "AT TIME ZONE" |