PHP.nl

pg_lo_truncate

pg_lo_truncate

Truncates a large object

bool **pg_lo_truncate** PgSql\Lob $lob int $size
truncates an  instance.

pg_lo_truncate``PgSql\Lob

To use the large object interface, it is necessary to enclose it within a transaction block.

lob``sizeThe number of bytes to truncate.

return.success

Voorbeeld: example

<?php
   $doc_oid = 189762345;
   $database = pg_connect("dbname=jacarta");
   pg_query($database, "begin");
   $handle = pg_lo_open($database, $doc_oid, "r");
   // Truncate to 0
   pg_lo_truncate($handle, 0);
   pg_query($database, "commit");
   echo $data;
?>

pg_lo_tell