Thread: postgre and sqlerror handling

postgre and sqlerror handling

From
"Ravi"
Date:
Hello All
 
  I am using postgresql in a 'C' program running on Linux. It's a simple program which inserts a row. This insert should give error. However in spite of me having error handling when I run this program it generates hundreds of the following error message:
 
"cannot insert duplicate key into a unique index
 NOTICE: UserAbortTransactionBlock and not in in-progress state."
 
I do not know why it does not use err handler and stop after first error.
 
2) Also when I use goto err_handler in my code it gives compile error. Can ayone suggets the correct syntax.
 
Thanks All
Ravi