Greetings,
I'd like to know is it possible to use "SAVEPOINT" in a function? In the following example, I got an error when calling this function:
CREATE OR REPLACE function test() returns trigger as $test$
BEGIN
SAVEPOINT savepoint1;
... ...
COMMIT;
RETURN NEW;
EXCEPTION
when RAISE_EXCEPTION THEN
ROLLBACK TO SAVEPOINT savepoint1;
END; $test$ language plpgsql;
Thanks a lot, Emi
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq