OpenSwoole\Coroutine\PostgreSQL->unlinkLOB(...)

Latest version: pecl install openswoole-26.11.1 | composer require openswoole/core:26.11.1

Declaration

<?php OpenSwoole\Coroutine\PostgreSQL->unlinkLOB(int $oid): bool

Parameters

oid

The OID of the large object to delete.

Return

Returns true when the large object was deleted, or false on failure, check the error property.


Description

Delete a large object from the database. Large object operations must run inside a transaction.


Example

<?php

use OpenSwoole\Coroutine\PostgreSQL;

co::run(function()
{
    $pg = new PostgreSQL();
    $pg->connect("host=127.0.0.1 port=5432 dbname=test user=postgres password=***");

    $oid = 16401; // OID of an existing large object

    $pg->query('BEGIN');
    var_dump($pg->unlinkLOB($oid));
    $pg->query('COMMIT');
});
Last updated on November 20, 2026