diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/plperl.sgml | 12 | ||||
-rw-r--r-- | doc/src/sgml/pltcl.sgml | 26 | ||||
-rw-r--r-- | doc/src/sgml/release.sgml | 11 |
3 files changed, 32 insertions, 17 deletions
diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml index 7893d263775..7642f50ca45 100644 --- a/doc/src/sgml/plperl.sgml +++ b/doc/src/sgml/plperl.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.31 2004/11/19 23:22:54 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.32 2004/11/21 21:17:01 tgl Exp $ --> <chapter id="plperl"> @@ -219,9 +219,13 @@ $nrows = $rv->{processed}; Emit a log or error message. Possible levels are <literal>DEBUG</>, <literal>LOG</>, <literal>INFO</>, <literal>NOTICE</>, <literal>WARNING</>, and <literal>ERROR</>. - <literal>ERROR</> raises an error condition: further execution - of the function is abandoned, and the current transaction is - aborted. + <literal>ERROR</> + raises an error condition; if this is not trapped by the surrounding + Perl code, the error propagates out to the calling query, causing + the current transaction or subtransaction to be aborted. This + is effectively the same as the Perl <literal>die</> command. + The other levels simply report the message to the system log + and/or client. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml index 09f8f82eaa4..b454c6a45f8 100644 --- a/doc/src/sgml/pltcl.sgml +++ b/doc/src/sgml/pltcl.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/pltcl.sgml,v 2.31 2004/09/20 22:48:25 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/pltcl.sgml,v 2.32 2004/11/21 21:17:02 tgl Exp $ --> <chapter id="pltcl"> @@ -449,17 +449,19 @@ SELECT 'doesn''t' AS ret <term><function>elog</> <replaceable>level</replaceable> <replaceable>msg</replaceable></term> <listitem> <para> - Emits a log or error message. Possible levels are - <literal>DEBUG</>, <literal>LOG</>, <literal>INFO</>, - <literal>NOTICE</>, <literal>WARNING</>, <literal>ERROR</>, and - <literal>FATAL</>. Most simply emit the given message just like - the <literal>elog</> C function. <literal>ERROR</> - raises an error condition: further execution of the function is - abandoned, and the current transaction is aborted. - <literal>FATAL</> aborts the transaction and causes the current - session to shut down. (There is probably no good reason to use - this error level in PL/Tcl functions, but it's provided for - completeness.) + Emits a log or error message. Possible levels are + <literal>DEBUG</>, <literal>LOG</>, <literal>INFO</>, + <literal>NOTICE</>, <literal>WARNING</>, <literal>ERROR</>, and + <literal>FATAL</>. Most simply emit the given message just like + the <literal>elog</> C function. <literal>ERROR</> + raises an error condition; if this is not trapped by the surrounding + Tcl code, the error propagates out to the calling query, causing + the current transaction or subtransaction to be aborted. This + is effectively the same as the Tcl <literal>error</> command. + <literal>FATAL</> aborts the transaction and causes the current + session to shut down. (There is probably no good reason to use + this error level in PL/Tcl functions, but it's provided for + completeness.) </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index e0d58a0ee0a..39f6f763c9b 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.309 2004/11/20 21:44:24 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.310 2004/11/21 21:17:02 tgl Exp $ --> <appendix id="release"> @@ -1686,6 +1686,15 @@ $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.309 2004/11/20 21:44:24 tgl Exp </para> </listitem> + <listitem> + <para> + In PL/Tcl, SPI commands are now run in subtransactions. If an error + occurs, the subtransaction is cleaned up and the error is reported + as an ordinary Tcl error, which can be trapped with <literal>catch</>. + Formerly, it was not possible to catch such errors. + </para> + </listitem> + </itemizedlist> </sect3> |