phaser Wed May 15 09:46:51 2002 EDT Added files: /phpdoc-pt_BR/reference/pgsql/functions pg-affected-rows.xml pg-cancel-query.xml pg-client-encoding.xml pg-close.xml pg-connect.xml pg-connection-busy.xml pg-connection-reset.xml pg-connection-status.xml pg-convert.xml pg-copy-from.xml pg-copy-to.xml pg-dbname.xml pg-delete.xml pg-end-copy.xml pg-escape-bytea.xml pg-escape-string.xml pg-fetch-array.xml pg-fetch-object.xml pg-fetch-result.xml pg-fetch-row.xml pg-field-is-null.xml pg-field-name.xml pg-field-num.xml pg-field-prtlen.xml pg-field-size.xml pg-field-type.xml pg-free-result.xml pg-get-result.xml pg-host.xml pg-insert.xml pg-last-error.xml pg-last-notice.xml pg-last-oid.xml pg-lo-close.xml pg-lo-create.xml pg-lo-export.xml Log: 1st pt_BR version
Index: phpdoc-pt_BR/reference/pgsql/functions/pg-affected-rows.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-affected-rows.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-affected-rows"> <refnamediv> <refname>pg_affected_rows</refname> <refpurpose>Retorna o número de registros afetados (linhas)</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_affected_rows</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> </methodsynopsis> <para> <function>pg_affected_rows</function> retorna o número de linhas (instâncias/registros/linhas) afetados por pedidos INSERT, UPDATE e DELETE executados por <function>pg_query</function>. Se nenhuma linha for afetada por esta função, ela retornará 0. <example> <title><function>pg_affected_rows</function></title> <programlisting role="php"> <![CDATA[ <?php $result = pg_query ($conn, "INSERT INTO publisher VALUES ('Author')"); $cmdtuples = pg_affected_rows ($result); echo $cmdtuples . " linhas foram afetadas."; ?> ]]> </programlisting> </example> </para> <note> <para> Esta função costumava ser chamada <literal>pg_cmdtuples()</literal>. </para> </note> <para> Veja também <function>pg_query</function> e <function>pg_num_rows</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-cancel-query.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-cancel-query.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.4 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 --> <refentry id='function.pg-cancel-query'> <refnamediv> <refname>pg_cancel_query</refname> <refpurpose> Cancela um pedido assíncrono </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>bool</type><methodname>pg_cancel_query</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>pg_cancel_query</function> cancela um pedido assíncrono enviado por <function>pg_send_query</function>. Você não pode cancelar um pediso executado por <function>pg_query</function>. </para> <para> Veja também <function>pg_send_query</function> e <function>pg_connection_busy</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-client-encoding.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-client-encoding.xml <?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-client-encoding"> <refnamediv> <refname>pg_client_encoding</refname> <refpurpose> Pega a codificação do cliente </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>string</type><methodname>pg_client_encoding</methodname> <methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>pg_client_encoding</function> retorna a codificação do cliente como uma string. A string de retorno pode ser SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, UNICODE, MULE_INTERNAL, LATINX (X=1...9), KOI8, WIN, ALT, SJIS, BIG5, WIN1250. </para> <note> <para> Esta função requer PHP-4.0.3 ou maior e PostgreSQL-7.0 ou maior Se libpq está compilada sem suporte a codificação multibyte <function>pg_set_client_encoding</function> sempre retornará "SQL_ASCII". Codificações suportadas depende da versão PostgreSQL. Vide o manual PostgreSQL para detalhes em como habilitar o suporte a multibyte e condificação. </para> <para> Esta função costumava ser chamada <function>pg_clientencoding</function>. </para> </note> <para> VEja também <function>pg_set_client_encoding</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-close.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-close.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 --> <refentry id="function.pg-close"> <refnamediv> <refname>pg_close</refname> <refpurpose>Fecha uma conexão PostgreSQL</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>bool</type><methodname>pg_close</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_close</function> fecha a conexão não persistente a um banco de dados PostgreSQL associado ao recurso <parameter>conexão</parameter> dado. &return.success; </para> <note> <para> O uso de <function>pg_close</function> normalmente não é necessário já que conexões não persistentes abertas são automaticamente fechadas ao final do processamento do script. </para> </note> <para> Se existem recursos de objeto grandes aberto na conexão, não feche a conexão antes de fechar todos os recursos de objeto grandes. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-connect.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-connect.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-connect"> <refnamediv> <refname>pg_connect</refname> <refpurpose>Abre uma conexão PostgreSQL</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>recurso</type><methodname>pg_connect</methodname> <methodparam><type>string</type><parameter>string_de_conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_connect</function> retorna um recurso de conexão que é exigido por outras funções PostgreSQL. </para> <para> <function>pg_connect</function> abre uma conexão para um banco de dados PostgreSQL especificado pela <parameter>string_de_conexão</parameter>. Ele retorna um recurso de conexão caso haja sucesso. Retorna &false; se a conexão não puder ser estabelecida. <parameter>string_de_conexão</parameter> deve ser uma string entre aspas duplas. <example> <title>Usando pg_connect</title> <programlisting role="php"> <![CDATA[ <?php $bdcon = pg_connect ("dbname=flavia"); //conecta a um banco de dados chamado "flavia" $bdcon2 = pg_connect ("host=localhost port=5432 dbname=flavia"); // conecta a um banco de dados chamado "flavia" em "localhost" na porta "5432" $bdcon3 = pg_connect ("host=ovelha port=5432 dbname=flavia user=ze password=buu"); //conecta a um banco de dados chamado "flavia" na máquina "ovelha" com um usuário e senha $con_string = "host=ovelha port=5432 dbname=flavia user=ze password=buu"; $bdcon4 = pg_connect ($con_string); //coneta a um banco de dados chamado "flavia" na máquina "ovelha" com um usuário e senha ?> ]]> </programlisting> </example> Os argumentos disponíveis para <parameter>string_de_conexão</parameter> incluem <parameter>host</parameter>, <parameter>porta</parameter>, <parameter>tty</parameter>, <parameter>opções</parameter>, <parameter>nomebd</parameter>, <parameter>usuário</parameter>, e <parameter>senha</parameter>. </para> <para> Se uma segunda chamada é feita para <function>pg_connect</function> com a mesma <parameter>string_de_conexão</parameter>, nenhuma nova conexão será estabelecida, ao invés disso o recurso de conexão da conexão que já está aberta será retornado. Você pode ter multiplas conexões para o mesmo banco de dados se você usar diferentes strings de conexão. </para> <para> A sintaxe antiga com parâmetros múltiplos <command>$con = pg_connect ("host", "porta", "optções", "tty", "nomebd") </command> está obsoleta. </para> <para> Veja também <function>pg_pconnect</function>, <function>pg_close</function>, <function>pg_host</function>, <function>pg_port</function>, <function>pg_tty</function>, <function>pg_options</function> e <function>pg_dbname</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-connection-busy.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-connection-busy.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 --> <refentry id='function.pg-connection-busy'> <refnamediv> <refname>pg_connection_busy</refname> <refpurpose> Verifica se a conexão está ocupada ou não </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>bool</type><methodname>pg_connection_busy</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_connection_busy</function> retorna &true; se a conexão está ocupada. Se estiver ocupada é porque um pedido anterior ainda etsá sendo executada. Se <function>pg_get_result</function> for chamado, ela será bloqeuada. </para> <para> Veja também <function>pg_connection_status</function> e <function>pg_get_result</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-connection-reset.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-connection-reset.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 --> <refentry id='function.pg-connection-reset'> <refnamediv> <refname>pg_connection_reset</refname> <refpurpose> Reinicia a conexão (reconecta) </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>bool</type><methodname>pg_connection_reset</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_connection_reset</function> reinicia a conexão. Isso é útil para recuperação de erros. &return.success; </para> <para> Veja também <function>pg_connect</function>, <function>pg_pconnect</function> e <function>pg_connection_status</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-connection-status.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-connection-status.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 --> <refentry id='function.pg-connection-status'> <refnamediv> <refname>pg_connection_status</refname> <refpurpose> Pega o status da conexão </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_connection_status</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_connection_status</function> retorna o status da conexão Status possíveis são <literal>PGSQL_CONNECTION_OK</literal> e <literal>PGSQL_CONNECTION_BAD</literal>. </para> <para> Veja também <function>pg_connection_busy</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-convert.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-convert.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.80 --> <refentry id='function.pg-convert'> <refnamediv> <refname>pg_convert</refname> <refpurpose> Converte os valores de uma array associativa em uma declaração SQL apropriada. </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>array</type><methodname>pg_convert</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> <methodparam><type>string</type><parameter>nome_da_tabela</parameter></methodparam> <methodparam><type>array</type><parameter>array_associativa</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>opções</parameter></methodparam> </methodsynopsis> <para> <function>pg_convert</function> checa e converte a <literal>array_associativa</literal> para uma declaração SQL apropriada. </para> <note> <para> Esta função é experimental. </para> </note> <para> Veja também <function>pg_metadata</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-copy-from.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-copy-from.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 --> <refentry id='function.pg-copy-from'> <refnamediv> <refname>pg_copy_from</refname> <refpurpose> Insere registros dentro de uma tabela a partir de uma array </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_copy_from</methodname> <methodparam><type>int</type><parameter>conexão</parameter></methodparam> <methodparam><type>string</type><parameter>nome_da_tabela</parameter></methodparam> <methodparam><type>array</type><parameter>linhas</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>delimitador</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>null_as</parameter></methodparam> </methodsynopsis> <para> <function>pg_copy_from</function> insere registros em uma tabela a partir de <parameter>linhas</parameter>. Ele usa o comando interno <literal>COPY</literal> para inserir registros. &return.success; </para> <para> Veja também <function>pg_copy_to</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-copy-to.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-copy-to.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id='function.pg-copy-to'> <refnamediv> <refname>pg_copy_to</refname> <refpurpose> Copia uma tabela em uma array </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_copy_to</methodname> <methodparam><type>int</type><parameter>conexão</parameter></methodparam> <methodparam><type>string</type><parameter>nome_da_tabela</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>delimitador</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>null_as</parameter></methodparam> </methodsynopsis> <para> <function>pg_copy_to</function> copia uma tabela em uma array. O array resultante é retornado. Caso haja falhas &false; é retornado. </para> <para> Veja também <function>pg_copy_from</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-dbname.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-dbname.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-dbname"> <refnamediv> <refname>pg_dbname</refname> <refpurpose>Pega o nome do banco de dados</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>string</type><methodname>pg_dbname</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_dbname</function> retorna o nome do banco de dados dado o recurso <parameter>conexão</parameter> do PostgreSQL. Ele retorna &false;, se a <parameter>conexão</parameter> não é um recurso de conexão PostgreSQL válido. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-delete.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-delete.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.4 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.80 --> <refentry id='function.pg-delete'> <refnamediv> <refname>pg_delete</refname> <refpurpose> Deleta registros. </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>long</type><methodname>pg_delete</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> <methodparam><type>string</type><parameter>nome_da_tabela</parameter></methodparam> <methodparam><type>array</type><parameter>array_associativa</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>opções</parameter></methodparam> </methodsynopsis> <para> <function>pg_delete</function> deleta a conedição de registro especificada por <literal>array_associativa</literal> que tem <literal>campo=>valor</literal>. Se <literal>opção</literal> é especificado, <function>pg_convert</function> é aplicada a <literal>array_associativa</literal> com a opção especificada. </para> <example> <title>pg_delete</title> <programlisting role="php"> <![CDATA[ <?php $db = pg_connect ('dbname=flavia'); // Isto é seguro, já que $_POST é convertida automaticamente $res = pg_delete($db, 'post_log', $_POST); if ($res) { echo "Dados de POST foram deletados: $res\n"; } else { echo "O usuário deve ter enviado inputs errados\n"; } ?> ]]> </programlisting> </example> <note> <para> Esta função é exsperimental. </para> </note> <para> Veja também <function>pg_convert</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-end-copy.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-end-copy.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 --> <refentry id="function.pg-end-copy"> <refnamediv> <refname>pg_end_copy</refname> <refpurpose>Sincroniza com o backend PostgreSQL</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>bool</type><methodname>pg_end_copy</methodname> <methodparam choice="opt"><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_end_copy</function> sincroniza o frontend PostgreSQL (geralmente um processo de web server) com o servidor PostgreSQL depois de fazer uma operação de cópia executada por <function>pg_put_line</function>. <function>pg_end_copy</function> deve ser chamada, caso contrário o servidor PostgreSQL pode perder a sincronia com o frontend fazendo com que o servidor gere um erro. &return.success; </para> <para> Para maiores detalhes e um exemplo, veja também <function>pg_put_line</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-escape-bytea.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-escape-bytea.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 --> <refentry id='function.pg-escape-bytea'> <refnamediv> <refname>pg_escape_bytea</refname> <refpurpose> Gera binarios para o tipo bytea </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>string</type><methodname>pg_escape_bytea</methodname> <methodparam><type>string</type><parameter>dados</parameter></methodparam> </methodsynopsis> <para> <function>pg_escape_bytea</function> gera uma string para um tipo de dados bytea. Ele retorna string com escapes. </para> <note> <para> Quando você usa SELECT bytea type, PostgreSQL retorna valores de byte octais prefixados por \. (ex.: \032) Os usuários devem converter de volta para binários por si mesmos. </para> <para> Esta função exige PostgreSQL 7.2 ou superior. Com PostgreSQL 7.2.0 e 7.2.1, o tipo de dados bytea deve ser criando quando você habilita o suporte a multi-byte. Por exemplo <literal>INSERT INTO tabela_teste (imagem) VALUES ('$imagem_escaped'::bytea);</literal> PostgreSQL 7.2.2 ou superior não precisa de coerção. A exceção é quando a codificação de caracteres do cliente e do backend não combinam, então pode haver erro de fluxo de multi-byte. O usuário deve fazer a coerção para bytea para evitar este erro. </para> <para> PostgreSQL mais novos suportarão a função unescape. Suporte para a função interna unescape será adicionada assim que estiver disponível. </para> </note> <para> Veja também <function>pg_escape_string</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-escape-string.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-escape-string.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 --> <refentry id='function.pg-escape-string'> <refnamediv> <refname>pg_escape_string</refname> <refpurpose> Gera string para o tipo text/char </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>string</type><methodname>pg_escape_string</methodname> <methodparam><type>string</type><parameter>dados</parameter></methodparam> </methodsynopsis> <para> <function>pg_escape_string</function> gera strings para o tipo de dados text/chat. Ele retorna uma string com escapes para PostgreSQL. O uso desta função é recomendado no lugar de <function>addslashes</function>. </para> <note> <para> Esta função exige PostgreSQL 7.2 ou superior. </para> </note> <para> VEja também <function>pg_escape_bytea</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-fetch-array.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-fetch-array.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.4 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-fetch-array"> <refnamediv> <refname>pg_fetch_array</refname> <refpurpose>Pega uma linha como um array</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>array</type><methodname>pg_fetch_array</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>linha</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>tipo_de_resultado</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_array</function> retorna uma array que corresponde 'a linha pega (registro). Ela retorna &false; se não existem mais linhas. </para> <para> <function>pg_fetch_array</function> é uma versão extendida de <function>pg_fetch_row</function>. Além de armazenar os dados em índices numéricos (index de campo) na array de resultado, ela também armazena os dados em índices associativos (nome do campo) por padrão. </para> <para> <parameter>linha</parameter> é o número da linha (registro) a ser recuperado. A primeira linha é 0. </para> <para> <parameter>tipo_de_resultado</parameter> é um parâmetro opicional que controla como o valor de retorno é iniciado <parameter>tipo_de_resultado</parameter> é uma constante e pode ter os seguintes valores: PGSQL_ASSOC, PGSQL_NUM, e PGSQL_BOTH. <function>pg_fetch_array</function> retorna uma array associativa que tem o nome de campo como chave para PGSQL_ASSOC. Index de campo como chave com PGSQL_NUM e ambos nome/index como chave com PGSQL_BOTH. O valor padrão é PGSQL_BOTH. <note> <para> <parameter>tipo_de_resultado</parameter> foi adicionado no PHP 4.0. </para> </note> </para> <para> <function>pg_fetch_array</function> NÃO é significativamente mais lento do que usar <function>pg_fetch_row</function>, enquanto ele fornece uma significativa facilidade de uso. </para> <para> Veja também <function>pg_fetch_row</function> e <function>pg_fetch_object</function> e <function>pg_fetch_result</function>. </para> <para> <example> <title>PostgreSQL fetch array</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publicar"); if (!$conn) { echo "Um erro ocorreu.\n"; exit; } $result = pg_query ($conn, "SELECT * FROM autores"); if (!$result) { echo "Um erro ororreu.\n"; exit; } $arr = pg_fetch_array ($result, 0, PGSQL_NUM); echo $arr[0] . " <- array\n"; $arr = pg_fetch_array ($result, 1, PGSQL_ASSOC); echo $arr["autor"] . " <- array\n"; ?> ]]> </programlisting> </example> </para> <note> <para> A partir do PHP 4.1.0, <parameter>linha</parameter> tornou-se opcional. A chamada <function>pg_fetch_array</function> irá incrementar o contador de linha interno em 1. </para> </note> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-fetch-object.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-fetch-object.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.6 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-fetch-object"> <refnamediv> <refname>pg_fetch_object</refname> <refpurpose>Pega uma linha como um objeto</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>objeto</type><methodname>pg_fetch_object</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>linha</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>tipo_de_resultado</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_object</function> retorna um objeto com propriedades que correspondem à linha pega. Ele retorna &false; se não existem mas linhas ou no caso de um erro. </para> <para> <function>pg_fetch_object</function> é similar a <function>pg_fetch_array</function>, com uma diferença - um objeto é retornado, ao invés de uma array. Indiretamente, isto significa que você pode acessar os dados somente através dos nomes de campos, e não por seus deslocamentos (números são nomes inválidos de propriedades). </para> <para> <parameter>linha</parameter> é o número da linha (registro) a ser recuperada. A primeira linha é 0. </para> <para> No tocante a velocidade, a função é identica a <function>pg_fetch_array</function>, e quase tão rápida quando <function>pg_fetch_row</function> (a diferença é insignificante). </para> <note> <para> A partir do PHP 4.3.0, <parameter>tipo_de_resultado</parameter> é padrão para PGSQL_ASSOC enquanto em outras versões mais antigas o padrão era PGSQL_BOTH. Não há utilidade para a propriedade numérica, já que nomes de propriedades numéricas são inválidas em PHP. </para> <para> <parameter>tipo_de_resultado</parameter> pode ser deletado em versões futuras. </para> </note> <para> Veja também <function>pg_query</function>, <function>pg_fetch_array</function>, <function>pg_fetch_row</function> e <function>pg_fetch_result</function>. </para> <para> <example> <title>Postgres fetch object</title> <programlisting role="php"> <![CDATA[ <?php $database = "verlag"; $db_conn = pg_connect ("host=localhost port=5432 dbname=$database"); if (!$db_conn): ?> <H1>Falha ao conectar com o banco de dados PostgreSQL <?php echo $database ?></H1> <?php exit; endif; $qu = pg_query ($db_conn, "SELECT * FROM verlag ORDER BY autor"); $row = 0; // postgres precisa de um contador de linha, outros dbs talvez não precisem while ($data = pg_fetch_object ($qu, $row)) { echo $data->autor." ("; echo $data->jahr ."): "; echo $data->titel."<BR>"; $row++; } ?> <PRE> <?php $fields[] = Array ("autor", "Autor"); $fields[] = Array ("jahr", " Ano"); $fields[] = Array ("titel", " Título"); $row= 0; while ($data = pg_fetch_object ($qu, $row)) { echo "----------\n"; reset ($fields); while (list (,$item) = each ($fields)): echo $item[1].": ".$data->$item[0]."\n"; endwhile; $row++; } echo "----------\n"; ?> </PRE> <?php pg_free_result ($qu); pg_close ($db_conn); ?> ]]> </programlisting> </example> </para> <note> <para> A partir do PHP 4.1.0, <parameter>linha</parameter> tornou-se opcional. Ao chamar <function>pg_fetch_object</function> o contador de linhas interno será acrescentado de 1. </para> </note> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-fetch-result.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-fetch-result.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 --> <refentry id="function.pg-fetch-result"> <refnamediv> <refname>pg_fetch_result</refname> <refpurpose>Retorna valores a partir de um recurso de resultado</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>misto</type><methodname>pg_fetch_result</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>linha</parameter></methodparam> <methodparam><type>misto</type><parameter>campo</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_result</function> retorna valores a partir de um recurso de <parameter>resultado</parameter> retornado por <function>pg_query</function>. <parameter>linha</parameter> é inteiro. <parameter>campo</parameter> é um nome de campo (string) ou um index de campo (inteiro). A <parameter>linha</parameter> e <parameter>campo</parameter> especificam que célula da tabela deve ser retornada. A numeração de linhas começa em 0. Ao invés de nomear o campo, você pode usar o index de campo sem aspas. Índices de campo iniciam-se em 0. </para> <para> PHP tem muitos tipos internos e apenas os tipos básicos são suportados aqui. Todas as formas de tipo <type>inteiro</type>, <type>booleano</type> e <type>vazio</type> são retornadas como valores <type>inteiro</type>. Todas as formas de float e tipos reais são retornados como valores <type>float</type>. Todos os outros tipos, incluindo arrays, são retornados como strings formatadas na mesma maneira padrão que o PostgreSQL retornaria com o programa <command>psql</command>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-fetch-row.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-fetch-row.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.4 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-fetch-row"> <refnamediv> <refname>pg_fetch_row</refname> <refpurpose>Pega uma linha como um array enumerado</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>array</type><methodname>pg_fetch_row</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>linha</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_row</function> pega uma linha de dados a partir do resultado associado com o recurso <parameter>resultado</oarameter> especificado. A linha (registro) é retornada como um array. Cada coluna do resultado é armazenado em um deslocamento de array, iniciando-se no deslocamento 0. </para> <para> Ela retorna um array que corresponde à linha pega, ou &false; se não existem mais linhas. </para> <para> Veja também: <function>pg_query</function>, <function>pg_fetch_array</function>, <function>pg_fetch_object</function> e <function>pg_fetch_result</function>. </para> <para> <example> <title>Pega linha Postgres</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publicar"); if (!$conn) { echo "Um erro ocorreu.\n"; exit; } $result = pg_query ($conn, "SELECT * FROM autores"); if (!$result) { echo "Um erro ocorreu.\n"; exit; } $num = pg_num_rows($result); for ($i=0; $i < $num; $i++) { $r = pg_fetch_row($result, $i); for ($j=0; $j < count($r); $j++) { echo "$r[$j] "; } echo "<BR>"; } ?> ]]> </programlisting> </example> </para> <note> <para> A partir do PHP 4.1.0, <parameter>linha</parameter> tornou-se opcional. Ao chamar <function>pg_fetch_row</function> o contador de linha interno será acrescentado em 1. </para> </note> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-field-is-null.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-field-is-null.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-field-is-null"> <refnamediv> <refname>pg_field_is_null</refname> <refpurpose>Testa se o campo é &null;</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_field_is_null</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>linha</parameter></methodparam> <methodparam><type>misto</type><parameter>campo</parameter></methodparam> </methodsynopsis> <para> <function>pg_field_is_null</function> testa se um campo é &null; ou não. Ela retorna 1 se o campo na linha dada é &null;. Ela retorna 0 se o campo na linha dada é NÃO &mull;. O campo pode ser especificado como um índice de coluna (número) ou como o nome de um campo (string). A numeração de linhas inicia-se em 0. </para> <note> <para> Esta função era chamada <literal>pg_fieldisnull()</literal>. </para> </note> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-field-name.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-field-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-field-name"> <refnamediv> <refname>pg_field_name</refname> <refpurpose>Retorna o nome do campo</refpurpose> </refnamediv> <refsect1> <title>Decrição</title> <methodsynopsis> <type>string</type><methodname>pg_field_name</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>numero_de_campo</parameter></methodparam> </methodsynopsis> <para> <function>pg_field_name</function> retorna o nome do campo ocupando o <parameter>numero_de_campo</parameter> dado no recurso de <parameter>resultado</parameter> PostgreSQL dado. A numeração de campo inicia-se em 0. </para> <note> <para> Esta função era chamada <literal>pg_fieldname()</literal>. </para> </note> <para> Veja também <function>pg_field_num</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-field-num.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-field-num.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-field-num"> <refnamediv> <refname>pg_field_num</refname> <refpurpose>Retorna o numero do campo referido</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_field_num</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>string</type><parameter>nome_de_campo</parameter></methodparam> </methodsynopsis> <para> <function>pg_field_num</function> irá retornar o número da vaga (slot) da coluna (campo) que corresponde ao <parameter>nome_de_campo</parameter> no recurso de <parameter>resultado</parameter> PostgreSQL dado. A numeração de campo inicia-se em 0. Esta função retornará -1 em caso de erro. </para> <note> <para> Esta função era chamada <literal>pg_fieldnum()</literal>. </para> </note> <para> Veja também <function>pg_field_name</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-field-prtlen.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-field-prtlen.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-field-prtlen"> <refnamediv> <refname>pg_field_prtlen</refname> <refpurpose>Retorna o comprimento impresso</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_field_prtlen</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>numero_de_linha</parameter></methodparam> <methodparam><type>string</type><parameter>numero_de_campo</parameter></methodparam> </methodsynopsis> <para> <function>pg_field_prtlen</function> o comprimento atual impresso (número de caracteres) de um valor especificado em um <parameter>resultado</parameter> PostgreSQL. A numeração de linha inicia-se em 0. Esta função retornará -1 em caso de erro. </para> <note> <para> Esta função era chamada <literal>pg_field_prtlen()</literal>. </para> </note> <para> Veja também <function>pg_field_size</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-field-size.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-field-size.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-field-size"> <refnamediv> <refname>pg_field_size</refname> <refpurpose> Retorna o tamanho de amrazenamento interno do campo denominado. </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_field_size</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>numero_de_capo</parameter></methodparam> </methodsynopsis> <para> <function>pg_field_size</function> retorna o tamanho de armazenamento interno (em bytes) do número de campo no <parameter>resultado</parameter> PostgrerSQL dado. A numeração de campo inicia-se em 0. Um campo de tamanho -1 indica um campo de tamanho variável. Esta função retornará &false; em caso de erro. </para> <note> <para> Esta função era chamada <literal>pg_fieldsize()</literal>. </para> </note> <para> Veja também <function>pg_field_len</function> e <function>pg_field_type</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-field-type.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-field-type.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.52 --> <refentry id="function.pg-field-type"> <refnamediv> <refname>pg_field_type</refname> <refpurpose> Retorna o nome do tipo para o campo de nome correspondente </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>string</type><methodname>pg_field_type</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>numero_de_campo</parameter></methodparam> </methodsynopsis> <para> <function>pg_field_type</function> retorna uma string contendo o nome do tipo do <parameter>numero_de_campo</parameter> dado no recurso de <parameter>resultado</parameter> PostgreSQL dado. A numeração de campo inicia-se em 0. </para> <note> <para> Esta função era chamada <literal>pg_field_type()</literal>. </para> </note> <para> Veja também <function>pg_field_len</function> e <function>pg_field_name</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-free-result.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-free-result.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-free-result"> <refnamediv> <refname>pg_free_result</refname> <refpurpose>Libera a memória usada pelo resultado</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>bool</type><methodname>pg_free_result</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> </methodsynopsis> <para> <function>pg_free_result</function> necessita ser usada apenas se você está preocupoado em usar muita memória enquanto seu script está rodando. Todos os resultados serão liberados da memória nautomaticamente assim que o script terminar de executar. Mas, se você tem certeza que não precisará mais dos dados do resultado em um script, você pode chamar <function>pg_free_result</function> com o recurso <parameter>resultado</parameter> como um argumento e a memória ocupada pelo resultado associado será liberada. Ele retorna &true; se houver sucesso e &false; se um erro ocorrer. <!-- NOTE: No ingles os aliases &true; e &false; não são usados, mas como tem sido prática o uso desses aliases, eu os substituí aqui. Caso haja algum erro por favor retorne. --> </para> <note> <para> Esta função era chamada <literal>pg_field_len()</literal>. </para> </note> <para> Veja também <function>pg_query</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-get-result.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-get-result.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.58 --> <refentry id='function.pg-get-result'> <refnamediv> <refname>pg_get_result</refname> <refpurpose> Pega o resultado de um pedigo assíncrono </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>recurso</type><methodname>pg_get_result</methodname> <methodparam choice="opt"><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_get_result</function> pega o recurso de resultado de um pedido (query) executado por <function>ps_send_query</function>. <function>pg_send_query</function> pode enviar múltiplos pedidos ao servidor PostgreSQL e <function>pg_get_result</function> é usado para pegar os resultados dos pedidos de um por um. Ele retorna o recurso de resultado. Se não houverem mais resultados ele retorna &false;. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-host.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-host.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-host"> <refnamediv> <refname>pg_host</refname> <refpurpose> Retorna o nome da máquina associada com a conexão </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>string</type><methodname>pg_host</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_host</function> retorna o nome da máquina a qual o recurso de <parameter>conexão</parameter> PostgreSQL está conectado. </para> <para> Veja também <function>pg_connect</function> e <function>pg_pconnect</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-insert.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-insert.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.4 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.80 --> <refentry id='function.pg-insert'> <refnamediv> <refname>pg_insert</refname> <refpurpose> Insere um array na tabela. </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>bool</type><methodname>pg_insert</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> <methodparam><type>string</type><parameter>nome_da_tabela</parameter></methodparam> <methodparam><type>array</type><parameter>array_associativa</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>opções</parameter></methodparam> </methodsynopsis> <para> <function>pg_insert</function> insere a <literal>array_associativa</literal> que tem <literal>campo=>valor</literal> dentro da tabela especificada por <literal>nome_da_tabela. Se <literal>opções</literal> é especificada, <function>pg_convert</function> é aplicada à <literal>array_associativa</literal> com a opção especificada. </para> <example> <title>pg_insert</title> <programlisting role="php"> <![CDATA[ <?php $db = pg_connect ('dbname=fernanda'); // This is safe, since $_POST is converted autotmatically $res = pg_insert($db, 'post_log', $_POST); if ($res) { echo "Dados POST arquivados com sucesso\n"; } else { echo "O usuário deve ter inserido entradas inválidas\n"; } ?> ]]> </programlisting> </example> <note> <para> Essa função é experimental. </para> </note> <para> Veja também <function>pg_convert</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-last-error.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-last-error.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-last-error"> <refnamediv> <refname>pg_last_error</refname> <refpurpose>Pega a string da última mensagem de erro de uma conexão</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>string</type><methodname>pg_last_error</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_last_error</function> retorna a última mensagem de erro para a <parameter>conexão</parameter> dada. </para> <para> As mensagens de erro podem ser sobescritas por chamadas internas ao PostgreSQL(libpq). Se múltiplos erros ocorrem dentro de um módulo de função PostgreSQL, ele pode não retornar o erro correto. </para> <para> Use <function>pg_result_error</function>, <function>pg_result_status</function> e <function>pg_connection_status</function> para um melhor tratamento de erros. </para> <note> <para> Esta função era chamada <literal>pg_errormessage()</literal>. </para> </note> <para> Veja também <function>pg_result_error</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-last-notice.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-last-notice.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 --> <refentry id="function.pg-last-notice"> <refnamediv> <refname>pg_last_notice</refname> <refpurpose> Retorna a última mensagem de nota do servidor PostgreSQL </refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>string</type><methodname>pg_last_notice</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_last_notice</function> retorna a última mensagem de nota do servidor PostgreSQL especificada por <parameter>conexão</parameter>. O servidor PostgreSQL envia notas em diversas situações, por exemplo, se as transações não puderem continuar. Com <function>pg_last_notice</function> você pode evitar a chamada de pedidos (queries) inúteis, checando quando a nota está relacionada ou não com a transação. </para> <warning> <para> Esta função é EXPERIMENTAL e ainda não está completamente implementada. <function>pg_last_notice</function> foi adicionada no PHP 4.0.6. Entretanto o PHP 4.0.6 tem problemas com a manipulação de mensagens. O uso do módulo PostgreSQL com o PHP 4.0.6 não é recomendada, mesmo se você não estiver usando <function>pg_last_notice</function>. </para> <para> Esta função é totalmente implementada no PHP 4.3.0Esta função é totalmente implementada no PHP 4.3.0. PHPs mais recentes que o 4.3.0 ignoram o parâmetro de conexão com o banco de dados. </para> </warning> <para> O rastreamento de mensagens de nota pode ser definido como opcional definindo 1 para <literal>pgsql.ignore_notice</literal> ini do PHP 4.3.0. </para> <para> O arquivamento (log) de mensagems pode ser pode ser definido como opcional mudando para 0 a diretina ini <literal>pgsql.log_notice</literal> no PHP 4.3.0. A não ser que <literal>pgsql.ignore_notice</literal> estiver definida para 0, mensagens de notas não podem ser arquivadas. </para> <para> Veja também <function>pg_query</function> e <function>pg_last_error</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-last-oid.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-last-oid.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 --> <refentry id="function.pg-last-oid"> <refnamediv> <refname>pg_last_oid</refname> <refpurpose>Retorna o ultimo oid do objeto</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_last_oid</methodname> <methodparam><type>recurso</type><parameter>resultado</parameter></methodparam> </methodsynopsis> <para> <function>pg_last_oid</function> é usado para recuperar o <varname>oid</varname> designado a uma linha (registro) se o recurso de resultado é usado a partir do último comando enviado através de <function>pq_query</function> se este comando era um INSERT SQL. Retorna um inteiro positivo se havia um <varname>oid</varname> válido. Ela retorna &false; se um erro ocorrer ou o último comando enviado através de <function>pg_query</function> não era INSERT ou se o INSERT falhou. </para> <para> Campo OID tornou-se opcional a partir do PostgreSQL 7.2. Quando um campo OID não é definido em uma tabela, o programador deve usar <function>pg_result_status</function> para checar se o registro foi inserido com sucesso ou não. </para> <note> <para> Esta função era chamada <literal>pg_getlastoid()</literal>. </para> </note> <para> Veja também <function>pg_query</function> e <function>pg_result_status</function> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-lo-close.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-lo-close.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-lo-close"> <refnamediv> <refname>pg_lo_close</refname> <refpurpose>Fecha um objeto grande</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>bool</type><methodname>pg_lo_close</methodname> <methodparam><type>recurso</type><parameter>objeto_grande</parameter></methodparam> </methodsynopsis> <para> <function>pg_lo_close</function> fecha um Objeto Grande (Large Object, daí vem o "lo" que integra o nome da função). <parameter>large_object</parameter> é um recurso para o objeto grande a partir de <function>pg_lo_open</function>. </para> <para> Para usar a interface de objetos grandes, é necessário encapsulá-lo dentro de um bloco de transação. </para> <note> <para> Esta função era chamada <literal>pg_loclose()</literal>. </para> </note> <para> Veja também <function>pg_lo_open</function>, <function>pg_lo_create</function> e <function>pg_lo_import</function>. </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-lo-create.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-lo-create.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-lo-create"> <refnamediv> <refname>pg_lo_create</refname> <refpurpose>Cria um objeto grande</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>int</type><methodname>pg_lo_create</methodname> <methodparam><type>recurso</type><parameter>conexão</parameter></methodparam> </methodsynopsis> <para> <function>pg_lo_create</function> cria um Objeto Grande e retorna o <varname>oid</varname> do objeto grande. <parameter>conexão</parameter> especifica uma conexão a um banco de dados válida aberta por <function>pg_connect</function> ou <function>pg_pconnect</function>. Os modos de acesso INV_READ, INV_WRITE e INV_ARCHIVE não são suportados, o objeto é criando sempre tando como o acesso a leitura como o acesso para escrita. INV_ARCHIVE foi removido do próprio PostgreSQL (6.3 adiante). Ele retorna o oid do objeto. Retorna &false; se um erro ocorrer. </para> <para> Para usar a interface de objetos grandes, é necessário encapsula-lo dentro de um bloco de transação. </para> <note> <para> Esta função era chamada <literal>pg_locreate()</literal>. </para> </note> </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 --> Index: phpdoc-pt_BR/reference/pgsql/functions/pg-lo-export.xml +++ phpdoc-pt_BR/reference/pgsql/functions/pg-lo-export.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: phaser Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.6 --> <refentry id="function.pg-lo-export"> <refnamediv> <refname>pg_lo_export</refname> <refpurpose>Exporta um objeto grande para um arquivo</refpurpose> </refnamediv> <refsect1> <title>Descrição</title> <methodsynopsis> <type>bool</type><methodname>pg_lo_export</methodname> <methodparam><type>int</type><parameter>oid</parameter></methodparam> <methodparam><type>string</type><parameter>caminho</parameter></methodparam> <methodparam choice="opt"><type>recurso</type><parameter>conxão</parameter></methodparam> </methodsynopsis> <para> O argumento <parameter>oid</parameter> especifica o oid do objeto grande a exportar e o argumento <parameter>caminho</parameter> especifica o caminho até o arquivo. Ela retorna &false; se um erro ocorrer, caso contrário retorna &true;. </para> <para> Para usar a interface de objetos grandes, é necessário encapsula-lo dentro de um bloco de transação. </para> <note> <para> Esta função era chamada <literal>pg_loexport()</literal>. </para> </note> <para> Veja também <function>pg_lo_import</function>. </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 -->