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 | conferences | my php.net

search for in the

pg_escape_bytea" width="11" height="7"/> <pg_delete
Last updated: Fri, 10 Oct 2008

view this page in

pg_end_copy

(PHP 4 >= 4.0.3, PHP 5)

pg_end_copyPostgreSQL バックエンドと同期する

説明

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_escape_bytea" width="11" height="7"/> <pg_delete
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites