mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-24 15:12:23 +01:00
130 lines
4.1 KiB
XML
130 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 5f1a92089fa4efe81e9777f87f9ed93f4853898b Maintainer: fernandowobeto Status: ready --><!-- CREDITS: fernandowobeto -->
|
|
<refentry xml:id="function.pg-parameter-status" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>pg_parameter_status</refname>
|
|
<refpurpose>Procura uma configuração de parâmetro atual do servidor</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>pg_parameter_status</methodname>
|
|
<methodparam choice="opt"><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>param_name</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Procura uma configuração de parâmetro atual do servidor.
|
|
</para>
|
|
<para>
|
|
Certos valores de parâmetros são reportados automaticamente pelo
|
|
servidor na inicialização da conexão ou sempre que seus valores mudam. <function>pg_parameter_status</function> pode ser
|
|
usado para interrogar essas configurações. Ele retorna o valor atual de um
|
|
parâmetro, se conhecido, ou &false; se o parâmetro não for conhecido.
|
|
</para>
|
|
<para>
|
|
Os parâmetros relatados pelo servidor incluem <literal>server_version</literal>,
|
|
<literal>server_encoding</literal>, <literal>client_encoding</literal>,
|
|
<literal>is_superuser</literal>, <literal>session_authorization</literal>,
|
|
<literal>DateStyle</literal>, <literal>TimeZone</literal> e <literal>integer_datetimes</literal>.
|
|
Observe que
|
|
<literal>server_version</literal>, <literal>server_encoding</literal> e <literal>integer_datetimes</literal>
|
|
não podem ser alterados após a inicialização do PostgreSQL.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>connection</parameter></term>
|
|
<listitem>
|
|
&pgsql.parameter.connection-with-unspecified-default;
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>param_name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Os possíveis valores de <parameter>param_name</parameter> incluem <literal>server_version</literal>,
|
|
<literal>server_encoding</literal>, <literal>client_encoding</literal>,
|
|
<literal>is_superuser</literal>, <literal>session_authorization</literal>,
|
|
<literal>DateStyle</literal>, <literal>TimeZone</literal> e
|
|
<literal>integer_datetimes</literal>. Observe que esse valor diferencia maiúsculas de minúsculas.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>Uma <type>string</type> contendo o valor do parâmetro, &false; em caso de falha ou
|
|
<parameter>param_name</parameter> inválido.</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
&pgsql.changelog.connection-object;
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemplo de <function>pg_parameter_status</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$dbconn = pg_connect("dbname=publisher") or die("Não foi possível conectar");
|
|
|
|
echo "Codificação de servidor: ", pg_parameter_status($dbconn, "server_encoding");
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Codificação de servidor: SQL_ASCII
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</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
|
|
-->
|