Query on exception handling in PL/pgSQL

Поиск
Список
Период
Сортировка
От diya das
Тема Query on exception handling in PL/pgSQL
Дата
Msg-id 20041126132856.96981.qmail@web54001.mail.yahoo.com
обсуждение исходный текст
Ответы Re: Query on exception handling in PL/pgSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Query on exception handling in PL/pgSQL  (Joachim Zobel <jzobel@heute-morgen.de>)
Список 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 по дате отправления:

Предыдущее
От: Cheng Shan
Дата:
Сообщение: Errors when deleting cords and droping table at the same time
Следующее
От: j0rd1 adame
Дата:
Сообщение: Error after adding Foreign Keys