4 <?php include "_skipif.inc"; ?>
11 $c = new pq\Connection(PQ_DSN);
12 $t = $c->startTransaction();
14 $lob = $t->createLOB();
15 fwrite($lob->stream, file_get_contents(__FILE__));
16 var_dump(ftell($lob->stream));
18 fseek($lob->stream, 0, SEEK_SET);
19 $dat = fread($lob->stream, filesize(__FILE__));
20 var_dump(hash("md5", $dat)==hash_file("md5", __FILE__));
22 ftruncate($lob->stream, 5);
24 $lob = new pq\Lob($t, $lob->oid);
25 var_dump(fread($lob->stream, 123));
28 $t->unlinkLOB($lob->oid);
37 Warning: ftruncate(): Can't truncate this stream! in %s on line %d
43 $c = new pq\Connection(PQ_DSN);
44 $t = $c->startTransaction();