- Document new pg_set_error_verbosity() function.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@182691 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christopher Kings-Lynne 2005-03-23 03:11:05 +00:00
parent 6d0afd7f43
commit 2e95af0fd1
2 changed files with 131 additions and 1 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<section id="pgsql.constants">
&reftitle.constants;
&extension.constants;
@ -390,6 +390,39 @@
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_ERRORS_TERSE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_ERRORS_DEFAULT</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>PGSQL_ERRORS_VERBOSE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>

View file

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.16 -->
<refentry id="function.pg-set-error-verbosity">
<refnamediv>
<refname>pg_set_error_verbosity</refname>
<refpurpose>
Set the error verbosity
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>pg_set_error_verbosity</methodname>
<methodparam><type>int</type><parameter>verbosity</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>int</type><methodname>pg_set_error_verbosity</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>int</type><parameter>verbosity</parameter></methodparam>
</methodsynopsis>
<para>
<function>pg_set_error_verbosity</function> determines the verbosity
of messages returned by <function>pg_last_error</function> and
<function>pg_result_error</function>. The <parameter>verbosity</parameter>
can be one of three constants: <literal>PGSQL_ERRORS_TERSE</literal>,
<literal>PGSQL_ERRORS_DEFAULT</literal>
or <literal>PGSQL_ERRORS_VERBOSE</literal>.
</para>
<para><function>pg_set_error_verbosity</function> will return the
<parameter>connection</parameter> previous verbosity.
</para>
<note>
<para>
This function requires PostgreSQL 7.4 or higher. Changing the
verbosity in this manner will only affect future results, existing
result objects will be unchanged.
</para>
</note>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>pg_set_error_verbosity</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$dbconn = pg_connect("dbname=publisher") or die("Could not connect");
if (!pg_connection_busy($dbconn)) {
pg_send_query($dbconn, "select * from doesnotexist;");
}
pg_set_error_verbosity($dbconn, PGSQL_ERRORS_VERBOSE);
$res1 = pg_get_result($dbconn);
echo pg_result_error($res1);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>pg_last_error</function></member>
<member><function>pg_result_error</function></member>
</simplelist>
</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
-->