mirror of
https://github.com/php/doc-es.git
synced 2026-03-25 16:02:13 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@334774 c90b9560-bf6c-de11-be94-00142212c4b1
113 lines
3.1 KiB
XML
113 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: jvenegasperu Status: ready -->
|
|
<refentry xml:id="function.pg-version" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>pg_version</refname>
|
|
<refpurpose>
|
|
Devuelve un array con el cliente, protocolo y versión del servidor (si está disponible)
|
|
</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>pg_version</methodname>
|
|
<methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pg_version</function> Devuelve un array con el cliente, protocolo
|
|
y la versión del servidor. Las versiones del protocolo y el servidor sólo están disponibles si PHP
|
|
se compiló con PostgreSQL 7.4 o posterior.
|
|
</para>
|
|
<para>
|
|
Para obtener información más detallada del servidor, utilice <function>pg_parameter_status</function>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>connection</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Recurso de conexión de base de datos PostgreSQL o PostgreSQL database connection resource. Cuando
|
|
el parametro <parameter>connection</parameter> no esta presente, se utiliza la conexión
|
|
por defecto. La conexión por defecto es la ultima conexión hecha por
|
|
<function>pg_connect</function> o <function>pg_pconnect</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve un array con el <literal>client</literal>, <literal>protocol</literal>
|
|
y <literal>server</literal> con sus claves y valores (si está disponibles). Devuelve
|
|
&false; en caso de error o una conexión no válida.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>pg_version</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$dbconn = pg_connect("host=localhost port=5432 dbname=mary")
|
|
or die("No e ha podido conectar");
|
|
|
|
$v = pg_version($dbconn);
|
|
|
|
echo $v['client'];
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
7.4
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>pg_parameter_status</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
|
|
-->
|