pg_lo_close
pg_lo_close
(PHP 4 >= 4.2.0, PHP 5, PHP 7)
pg_lo_close - 关闭一个大对象
描述
bool pg_lo_close ( resource $large_object )
pg_lo_close()
关闭一个大对象。large_object
是来自pg_lo_open()的大对象的资源。
要使用大对象接口,必须将其放在事务块中。
注意
:这个函数被称为pg_loclose()
。
参数
result
PostgreSQL大对象(LOB)资源,由pg_lo_open()返回。
返回值
返回TRUE
成功或返回FALSE
失败。
例子
Example #1 pg
_
lo
_
close() example
<?php
$database = pg_connect("dbname=jacarta"
pg_query($database, "begin"
$oid = pg_lo_create($database
echo "$oid\n";
$handle = pg_lo_open($database, $oid, "w"
echo "$handle\n";
pg_lo_write($handle, "large object data"
pg_lo_close($handle
pg_query($database, "commit"
?>