pg_lo_unlink

(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

pg_lo_unlink刪除一個(gè)大型對(duì)象

說明

pg_lo_unlink(resource $connection, int $oid): bool

pg_lo_unlink() 刪除由 oid 指定的大型對(duì)象。成功時(shí)返回 true, 或者在失敗時(shí)返回 false。

要使用大型對(duì)象(lo)接口,需要將其放置在事務(wù)塊中。

注意:

本函數(shù)以前的名字為 pg_lo_unlink()

參數(shù)

connection

PostgreSQL database connection resource. When connection is not present, the default connection is used. The default connection is the last connection made by pg_connect() or pg_pconnect().

oid

The OID of the large object in the database.

返回值

成功時(shí)返回 true, 或者在失敗時(shí)返回 false。

范例

示例 #1 pg_lo_unlink() example

<?php
   
// OID of the large object to delete
   
$doc_oid 189762345;
   
$database pg_connect("dbname=jacarta");
   
pg_query($database"begin");
   
pg_lo_unlink($database$doc_oid);
   
pg_query($database"commit");
?>

參見