Re: [ADMIN] error handling unique key constraint in pgsql

2008-06-10 Thread Dinesh
Great. That's what I was looking for. Thanks a lot guys. Dinesh Alex Hunsaker wrote: On Tue, Jun 10, 2008 at 2:46 PM, Dinesh <[EMAIL PROTECTED]> wrote: Hi Scott, Thanks for your reply. Is there a built in exception in pl/pgsql ( similar to oracle's |DUP_VAL_ON_INDEX ) that I can use? I r

Re: [ADMIN] error handling unique key constraint in pgsql

2008-06-10 Thread Alex Hunsaker
On Tue, Jun 10, 2008 at 2:46 PM, Dinesh <[EMAIL PROTECTED]> wrote: > Hi Scott, > > Thanks for your reply. > > Is there a built in exception in pl/pgsql ( similar to oracle's > |DUP_VAL_ON_INDEX ) that I can use? > > I ran into an unique situation a couple of days ago. Procedure that inserts > a new

Re: [ADMIN] error handling unique key constraint in pgsql

2008-06-10 Thread Dinesh
Hi Scott, Thanks for your reply. Is there a built in exception in pl/pgsql ( similar to oracle's |DUP_VAL_ON_INDEX ) that I can use? I ran into an unique situation a couple of days ago. Procedure that inserts a new value into unique index column was called at the same time. I even check if

Re: [ADMIN] error handling unique key constraint in pgsql

2008-06-10 Thread Scott Marlowe
On Tue, Jun 10, 2008 at 10:52 AM, Dinesh <[EMAIL PROTECTED]> wrote: > Hi All, > > I was wondering if there is an easy way to handle unique key constraint in > pgsql. Right now my entire transaction aborts if it tries to insert > duplicate keys, but I would like to handle this > scenario in such a w

[ADMIN] error handling unique key constraint in pgsql

2008-06-10 Thread Dinesh
Hi All, I was wondering if there is an easy way to handle unique key constraint in pgsql. Right now my entire transaction aborts if it tries to insert duplicate keys, but I would like to handle this scenario in such a way that the transaction will not break. Please let me know if you have don