Query on exception handling in PL/pgSQL - Mailing list pgsql-general

From diya das
Subject Query on exception handling in PL/pgSQL
Date
Msg-id 20041126132856.96981.qmail@web54001.mail.yahoo.com
Whole thread Raw
Responses Re: Query on exception handling in PL/pgSQL
Re: Query on exception handling in PL/pgSQL
List pgsql-general
Hi,

  I am just a beginner in postgreSQL and writing some
functions in PL/pgSQL. I use the libpq interface in
the client to call this funtions.  My pgsql function
does an insert to a table and I have opened a
transaction block before calling my function from the
client. When the insert operation fails due to unique
key violation the whole transaction aborts. Is there a
way I can handle this error in my pgsql funtion rather
that aborting and not executing the rest of the
operations?. I have a workaround , But I was wondering
if there is an inexpensive way of doing it.

Another query I have is related to returning values
from funtions. How can I return multiple values from a
function? Is there any support for OUT variable in
pgsql functions?
Any pointers on this is greatly appreciated.

Thanks
Diya.



__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

pgsql-general by date:

Previous
From: Cheng Shan
Date:
Subject: Errors when deleting cords and droping table at the same time
Next
From: j0rd1 adame
Date:
Subject: Error after adding Foreign Keys