Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: pg_end_copy - Manual
[go: Go Back, main page]

PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<pg_deletepg_escape_bytea" width="11" height="7"/>
view the version of this page
Last updated: Sun, 07 May 2006

pg_end_copy

(PHP 4 >= 4.0.3, PHP 5)

pg_end_copy -- PostgreSQL バックエンドと同期する

説明

bool pg_end_copy ( [resource connection] )

pg_end_copy() は、pg_put_line() によるコピー操作の後で PostgreSQL フロントエンド(通常は Web サーバ プロセス)と PostgreSQL サーバを同期させます。 pg_end_copy() を実行しなければ、PostgreSQL サーバが フロントエンドとの同期を失ってしまい、エラーが発生します。

パラメータ

connection

PostgreSQL データベース接続リソース。connection が指定されていない場合はデフォルトの接続が使用されます。 デフォルトの接続は、直近の pg_connect() あるいは pg_pconnect() によって作成されたものです。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例 1. pg_end_copy() の例

<?php
  $conn
= pg_pconnect("dbname=foo");
 
pg_query($conn, "create table bar (a int4, b char(16), d float8)");
 
pg_query($conn, "copy bar from stdin");
 
pg_put_line($conn, "3\thello world\t4.5\n");
 
pg_put_line($conn, "4\tgoodbye world\t7.11\n");
 
pg_put_line($conn, "\\.\n");
 
pg_end_copy($conn);
?>



add a note add a note User Contributed Notes
pg_end_copy
There are no user contributed notes for this page.

<pg_deletepg_escape_bytea" width="11" height="7"/>
 Last updated: Sun, 07 May 2006
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2006 The PHP Group
All rights reserved.
This mirror generously provided by: PacketBusiness, Inc.
Last updated: Wed Jun 28 13:19:26 2006 JST