Re: [GENERAL] Transaction commit in a trigger function

2007-05-20 Thread Henka
> - dblink would allow you to open another connection concurrently This suggestion worked perfectly, thank you very much. ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail co

Re: [GENERAL] Transaction commit in a trigger function

2007-05-17 Thread PFC
I can't wrap BEGIN/COMMIT around the INSERT in the trigger. Is there another way of achieving this? - Savepoints (won't work with your trigger approach) - dblink would allow you to open another connection concurrently ---(end of broadcast)

Re: [GENERAL] Transaction commit in a trigger function

2007-05-17 Thread Alvaro Herrera
Henka wrote: > Is it possible to (somehow) commit a specific statement in a trigger > function if the function itself is rolled back because of an error (eg, for a > unique index error)? No. You can use savepoints (or, in PL/pgSQL functions, EXCEPTION blocks) to inhibit the uniqueness error from

[GENERAL] Transaction commit in a trigger function

2007-05-17 Thread Henka
Hi there, I'm using PG 8.2.3. Is it possible to (somehow) commit a specific statement in a trigger function if the function itself is rolled back because of an error (eg, for a unique index error)? For example: create table tab1 (col1 int unique); create table tab2 (col1 int); CREATE OR REPLAC