Function to take a large object size:
<?php
function pg_lo_size ($lo) {
$pos = pg_lo_tell ($lo);
pg_lo_seek ($lo, 0, PGSQL_SEEK_END);
$size = pg_lo_tell ($lo);
pg_lo_seek ($lo, $pos, PGSQL_SEEK_SET);
return $size;
}
?>
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
pg_lo_tell — Retorna a posição atual de um objeto grande (large object)
$large_object
) : intpg_lo_tell() retorna a posição atual (deslocamento a partir do início do objeto grande).
Veja também pg_lo_seek().