Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-26.11.1 | composer require openswoole/core:26.11.1
<?php OpenSwoole\Coroutine\PostgreSQL->unlinkLOB(int $oid): bool
The OID of the large object to delete.
Returns true when the large object was deleted, or false on failure, check the error property.
Delete a large object from the database. Large object operations must run inside a transaction.
<?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');
});