(PHP 5 >= 5.1.2, PECL pdo_pgsql:1.0.1-1.0.2)
PDO::pgsqlLOBUnlink — Deletes the large object
Deletes a large object from the database identified by OID.
Note: This function must be called within a transaction.
A large object identifier
如果成功则返回 TRUE,失败则返回 FALSE。
Example#1 A PDO::pgsqlLOBUnlink() example
This example unlinks a large object from the database prior to deleting the row that references it from the blobs table we've been using in our PDO::pgsqlLOBCreate() and PDO::pgsqlLOBOpen() examples.
<?php
$db = new PDO('pgsql:dbname=test host=localhost', $user, $pass);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->beginTransaction();
$db->pgsqlLOBUnlink($oid);
$stmt = $db->prepare("DELETE FROM BLOBS where ident = ?");
$stmt->execute(array($some_id));
$db->commit();
?>