Hello all,
I have a java program that excepts print streams and inserts in into a spool table as a bytea. This fires a pl/pgsql trigger that passes the bytea to a pl/perl function to process the bytea and spits the results as an array back. It then proceeds to insert the data into multiple tables. Problem is that two of the tables data is inserted into inside this transaction, one has a foreign key to the other. As you can guess I get a foreign key violation because the transaction is not committed and as far as I understand PostgreSQL does not support dirty reads or nested transactions. I have two questions. 1) what is there another way to handle this transaction that would resolve this violation without using dirty reads and 2) It looks like running the trigger after insert on a table does not run as a separate transaction. Is the insert to that table suppose to fail if the trigger fails? To me that defeats the purpose of having a trigger after insert.
Thanks for any help
-- ------------------------- Stephen Howie
begin:vcard fn:Stephen Howie n:Howie;Stephen email;internet:[EMAIL PROTECTED] tel;work:260-760-5910 tel;fax:260-436-9472 tel;cell:260-704-6262 x-mozilla-html:FALSE version:2.1 end:vcard
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]