how can I check the error status??

Поиск
Список
Период
Сортировка
От Luis Alberto Pérez Paz
Тема how can I check the error status??
Дата
Msg-id 7f64980c0604251038t2bfeb4bbmf4d0e909f16d2d1f@mail.gmail.com
обсуждение исходный текст
Ответы Re: how can I check the error status??  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Hi everybody!
 
I'm migrating some sybase store procedures to postgres functions,
I almost have found all that I need, however I dont know how to check the error status of the last transaction.
I need to find in postgres the equivalent to the sybase @@error global variable.
 
I mean, how can I translate this code in a postgres function?:
 
insert into table (a,b,c) values (1,2,3)
 if (@@error =0)
  return 0
 else
  return -900
 
 
Any advices?
 
thanks in advance!
 
Luis Paz.


--
paz, amor y comprensión
        (1967-1994)

В списке pgsql-general по дате отправления:

Предыдущее
От: Bill Moseley
Дата:
Сообщение: Re: Anyone install 8.1 on Debian Stable?
Следующее
От: Gavin Hamill
Дата:
Сообщение: Re: Anyone install 8.1 on Debian Stable?