diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2002-04-20 14:06:47 +0000 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2002-04-20 14:06:47 +0000 |
commit | 3087b96ecef1628294373a87dfe30c4d4fe41aa1 (patch) | |
tree | 84686383b86bd48df8ed3fe07d56a2c055562ec3 /ext/pgsql/tests | |
parent | 63c3c0874a9387e422bbfda94f92f36f6b66f7a5 (diff) | |
download | php-git-3087b96ecef1628294373a87dfe30c4d4fe41aa1.tar.gz |
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)
Diffstat (limited to 'ext/pgsql/tests')
-rw-r--r-- | ext/pgsql/tests/large_object.inc | 15 |
1 files changed, 14 insertions, 1 deletions
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"; |