From: | T(dot)R(dot)Missner(at)Level3(dot)com |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | trigger insert duplicate rows question |
Date: | 2001-09-26 04:39:05 |
Message-ID: | EBFCF3982143D511A77F0008C716807E0106DB30@N0400IDC1.oss.level3.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have designed a trigger that will insert a row
in a table if a check to see if the row is already there fails.
Everything works as expected when running slow or with few threads.
but when I kick up the threads that handle the initial insert that
'triggers' the trigger I run into some trouble. It seems that
in some cases after the trigger function has done a selct to see it
the data already exist then moves on to the insert the insert fails
because another thread has already finished inserting the same row.
I get an error about duplicate rows etc.
This in itself is really not a problem. What I would like to do
is suppress the error message somehow. I am using jdbc on the client side
and can't figure out how to suppress the error from going to stdout.
Can I capture it in the procedure code?
Any other suggestions?
Is there a way to get a return from the insert statement in the prodecure?
thanks in advance.
t.r. missner
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2001-09-26 04:52:25 | Re: WHERE CLAUSE |
Previous Message | Tom Lane | 2001-09-26 04:33:34 | Re: Where are Perl DBI and DBD for PostgreSQL?? |