Re: [SQL] transaction in function

2006-12-05 Thread Din Adrian
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 POPE

Re: [SQL] transaction in function

2006-12-05 Thread Tom Lane
Marian POPESCU <[EMAIL PROTECTED]> 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

Re: [SQL] transaction in function

2006-12-05 Thread A. Kretschmer
am Tue, dem 05.12.2006, um 16:25:31 +0100 mailte Marian POPESCU folgendes: > 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 ?

[SQL] transaction in function

2006-12-05 Thread Marian POPESCU
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 broadca