1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-25 16:22:18 +01:00
Files
archived-doc-ru/reference/pgsql/functions/pg-set-error-context-visibility.xml
Mikhail Alferov 0aef87fd28 Добавление перевода (#682)
Co-authored-by: Sergey Panteleev <sergey@php.net>
2024-01-11 21:25:45 +03:00

111 lines
3.5 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: ebd624e434f6a49aa951a3a2e3efbe736a95c02c Maintainer: sergey Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.pg-set-error-context-visibility" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>pg_set_error_context_visibility</refname>
<refpurpose>
Определяет видимость сообщений об ошибках контекста, возвращаемых функциями <function>pg_last_error</function>
и <function>pg_result_error</function>
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>pg_set_error_context_visibility</methodname>
<methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
<methodparam><type>int</type><parameter>visibility</parameter></methodparam>
</methodsynopsis>
<para>
Определяет видимость сообщений об ошибках контекста, возвращаемых функциями <function>pg_last_error</function>
и <function>pg_result_error</function>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
&pgsql.parameter.connection;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>visibility</parameter></term>
<listitem>
<para>
Требуемая видимость: <constant>PGSQL_SHOW_CONTEXT_NEVER</constant>,
<constant>PGSQL_SHOW_CONTEXT_ERRORS</constant>
или <constant>PGSQL_SHOW_CONTEXT_ALWAYS</constant>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Функция возвращает предыдущий уровень видимости: <constant>PGSQL_SHOW_CONTEXT_NEVER</constant>,
<constant>PGSQL_SHOW_CONTEXT_ERRORS</constant>
или <constant>PGSQL_SHOW_CONTEXT_ALWAYS</constant>.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example xml:id="function.pg-set-error-context-visibility.example.basic">
<title>Пример использования функции <function>pg_set_error_context_visibility</function></title>
<programlisting role="php">
<![CDATA[
<?php
$dbconn = pg_connect("dbname=publisher") or die("Не удалось установить соединение");
if (!pg_connection_busy($dbconn)) {
pg_send_query($dbconn, "select * from doesnotexist;");
}
pg_set_error_context_visibility($dbconn, PGSQL_SHOW_CONTEXT_ALWAYS);
$res1 = pg_get_result($dbconn);
echo pg_result_error($res1);
?>
]]>
</programlisting>
</example>
</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:"~/.phpdoc/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
-->