Re: Text Description of Current Exception

Поиск
Список
Период
Сортировка
От Justin
Тема Re: Text Description of Current Exception
Дата
Msg-id 49D59164.8080601@emproshunts.com
обсуждение исходный текст
Ответ на Text Description of Current Exception  ("Ward Eaton" <Ward.Eaton@rad-con.com>)
Список pgsql-admin
Ward Eaton wrote: <blockquote cite="mid:04A6DB42D2BA534FAC77B90562A6A03DD629A9@server.rad-con.local"
type="cite"><style>
<!--/* Font Definitions */@font-face{font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}/* Style Definitions
*/p.MsoNormal,li.MsoNormal, div.MsoNormal{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New
Roman";}
a:link, span.MsoHyperlink{color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed{color:purple;text-decoration:underline;}
span.EmailStyle17{mso-style-type:personal-compose;font-family:Arial;color:windowtext;}
@page Section1{size:8.5in 11.0in;margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1{page:Section1;}
--> </style><div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;
font-family:Arial;">Hello,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;
font-family:Arial;"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt;
font-family:Arial;">I would like to log any exceptions which may be thrown in my database functions.  Oracle has a
predefinedvariable,</span></font><font color="blue" face="Arial"><span style="font-family: Arial; color: blue;">
</span></font><fontface="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">SQLERRM, which will always
havea text description of the current exception.  Is there anything like this available in postgres?</span></font><p
class="MsoNormal"><fontface="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font><p
class="MsoNormal"style=""><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"><font
color="blue"><spanstyle="color: blue;"><a href="mailto:Ward.Eaton@RAD-CON.com" moz-do-not-send="true"
title="mailto:Michael.Loufman@RAD-CON.com"><span
title="mailto:Michael.Loufman@RAD-CON.com"></span></a></span></font></span></font><fontface="Tahoma" size="2"><span
style="font-size:10pt; font-family: Tahoma;"></span></font></div></blockquote><br /><div class="Section1"><p
class="MsoNormal"><fontface="Times New Roman" size="3"><span style="font-size: 12pt;"><br /></span></font></div> I'm
notsure what you are after.  Your requesting logging the error yet referring to SqlErrm used in exception blocks<br
/><br/> postgresql has SQLSTATE used in  exception catching of errors in a pl/SQL function  see<br /><a
class="moz-txt-link-freetext"
href="http://www.postgresql.org/docs/8.3/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING">http://www.postgresql.org/docs/8.3/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING</a><br
/><br/> Postgresql logs errors in a log file unless it's been turned off.<br /> See configure logging <br /><a
class="moz-txt-link-freetext"
href="http://www.postgresql.org/docs/8.3/interactive/runtime-config-logging.html">http://www.postgresql.org/docs/8.3/interactive/runtime-config-logging.html</a><br
/><br/><br /> These instructions are for 8.3  if you have different version go to this section of the help files for
yourspecific version.<br /><br /> 

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

Предыдущее
От: Tony Liao
Дата:
Сообщение: how to do prefix_range default value?
Следующее
От: Nicolas Michel
Дата:
Сообщение: Memory Problem