Text Description of Current Exception
Text Description of Current Exception
Hello,
I would like to log any exceptions which may be thrown in my database functions. Oracle has a predefined variable, SQLERRM, which will always have a text description of the current exception. Is there anything like this available in postgres?
Thank you,
Ward Eaton
Project Engineer Automation
RAD-CON Inc.
TECHNOLOGY: Innovative & Proven
Office: +1.216.706.8927
Fax: +1.216.221.1135
Website: www.RAD-CON.com
E-mail: Ward.Eaton@RAD-CON.com
Re: Text Description of Current Exception
От:
Justin <justin@emproshunts.com>
Дата:
Ward Eaton wrote:
I'm not sure what you are after. Your requesting logging the error yet referring to SqlErrm used in exception blocks
postgresql has SQLSTATE used in exception catching of errors in a pl/SQL function see
http://www.postgresql.org/docs/8.3/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
Postgresql logs errors in a log file unless it's been turned off.
See configure logging
http://www.postgresql.org/docs/8.3/interactive/runtime-config-logging.html
These instructions are for 8.3 if you have different version go to this section of the help files for your specific version.
postgresql has SQLSTATE used in exception catching of errors in a pl/SQL function see
http://www.postgresql.org/docs/8.3/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
Postgresql logs errors in a log file unless it's been turned off.
See configure logging
http://www.postgresql.org/docs/8.3/interactive/runtime-config-logging.html
These instructions are for 8.3 if you have different version go to this section of the help files for your specific version.