From 3087b96ecef1628294373a87dfe30c4d4fe41aa1 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Sat, 20 Apr 2002 14:06:47 +0000 Subject: Make pg_lo_import()/pg_lo_unlink()/pg_lo_open()/pg_lo_export() work with oid larger than 2^31. @Added large OID value (2^31 to 2^32) support for pg_lo_import()/pg_lo_unlink()/pg_lo_open()/pg_lo_export(). (Yasuo) --- ext/pgsql/tests/large_object.inc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ext/pgsql/tests') diff --git a/ext/pgsql/tests/large_object.inc b/ext/pgsql/tests/large_object.inc index 5ad84e2c4b..5b8d1f8b72 100644 --- a/ext/pgsql/tests/large_object.inc +++ b/ext/pgsql/tests/large_object.inc @@ -28,7 +28,20 @@ pg_lo_close($handle); pg_exec ($db, "commit"); pg_exec ($db, "begin"); -pg_lo_unlink($oid); +pg_lo_unlink($db, $oid) or print("pg_lo_unlink() error\n"); +pg_exec ($db, "commit"); + +// more pg_lo_unlink() tests +// Test without connection +pg_exec ($db, "begin"); +$oid = pg_lo_create ($db) or print("pg_lo_create() error\n"); +pg_lo_unlink($oid) or print("pg_lo_unlink() error\n"); +pg_exec ($db, "commit"); + +// Test with string oid value +pg_exec ($db, "begin"); +$oid = pg_lo_create ($db) or print("pg_lo_create() error\n"); +pg_lo_unlink($db, (string)$oid) or print("pg_lo_unlink() error\n"); pg_exec ($db, "commit"); echo "OK"; -- cgit v1.2.1