(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
pg_lo_close — 关闭大对象
pg_lo_close() 关闭大对象。
要使用大对象接口,必须将其封装在事务块中。
注意:
本函数以前的名字为 pg_loclose()。
示例 #1 pg_lo_close() 示例
<?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");
?>