mirror of
https://github.com/php/doc-es.git
synced 2026-04-28 01:23:14 +02:00
121 lines
4.1 KiB
XML
121 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: c43a3cd9b49627b8d42a4b6ad530e10e26ca30dd Maintainer: lacatoire Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.pg-parameter-status" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>pg_parameter_status</refname>
|
|
<refpurpose>
|
|
Consulta un parámetro de configuración actual del servidor
|
|
</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>string</type><type>false</type></type><methodname>pg_parameter_status</methodname>
|
|
<methodparam choice="opt"><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Consulta un parámetro de configuración actual del servidor.
|
|
</para>
|
|
<para>
|
|
Ciertos valores de parámetros son devueltos por el servidor automáticamente al inicio de la conexión o cuando un valor cambia. <function>pg_parameter_status</function> puede ser utilizada para consultar estas configuraciones. La función devuelve el valor actual del parámetro si es conocido o &false; si el parámetro es desconocido.
|
|
</para>
|
|
<para>
|
|
Los parámetros devueltos por el servidor son <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> y <literal>integer_datetimes</literal>. Tenga en cuenta que <literal>server_version</literal>, <literal>server_encoding</literal> y <literal>integer_datetimes</literal> no pueden cambiar después del inicio de 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>name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Los valores posibles de <parameter>name</parameter> son <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> y <literal>integer_datetimes</literal>. Cabe señalar que este valor es sensible a mayúsculas y minúsculas.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Una <type>string</type> que contiene el valor del parámetro, &false; en caso de fallo o si el parámetro <parameter>name</parameter> es 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>Ejemplo con <function>pg_parameter_status</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$dbconn = pg_connect("dbname=publisher") or die("Conexión imposible");
|
|
|
|
echo "Codificación del servidor: ", pg_parameter_status($dbconn, "server_encoding");
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Codificación del 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
|
|
-->
|