Search Postgresql Archives

how can I check the error status??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux