2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2003-12-19 15:50:07 +00:00
|
|
|
<!-- $Revision: 1.4 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 -->
|
|
|
|
<refentry id="function.pg-last-error">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>pg_last_error</refname>
|
|
|
|
<refpurpose>Get the last error message string of a connection</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>string</type><methodname>pg_last_error</methodname>
|
2002-08-01 14:41:25 +00:00
|
|
|
<methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
<function>pg_last_error</function> returns the last error message
|
|
|
|
for given <parameter>connection</parameter>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Error messages may be overwritten by internal PostgreSQL(libpq)
|
|
|
|
function calls. It may not return appropriate error message, if
|
2003-12-19 15:50:07 +00:00
|
|
|
multiple errors are occurred inside a PostgreSQL module function.
|
2002-04-15 00:12:54 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Use <function>pg_result_error</function>,
|
|
|
|
<function>pg_result_status</function> and
|
|
|
|
<function>pg_connection_status</function> for better error handling.
|
|
|
|
</para>
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
This function used to be called <literal>pg_errormessage()</literal>.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
<para>
|
|
|
|
See also <function>pg_result_error</function>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|