--TEST-- PostgreSQL large object --EXTENSIONS-- pgsql --SKIPIF-- --FILE-- getMessage(), \PHP_EOL; } try { pg_lo_create($db, -15); } catch (\ValueError $e) { echo $e->getMessage(), \PHP_EOL; } try { pg_lo_create('giberrish'); } catch (\ValueError $e) { echo $e->getMessage(), \PHP_EOL; } try { pg_lo_create($db, 'giberrish'); } catch (\ValueError $e) { echo $e->getMessage(), \PHP_EOL; } echo "OK"; ?> --EXPECTF-- create/write/close LO open/read/tell/seek/close LO string(5) "large" int(5) bool(true) string(10) "bject data" int(17) bool(true) string(17) "large object data" bool(true) string(4) "data" open/read_all/close LO large object data int(17) unlink LO Test without connection Deprecated: pg_lo_unlink(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d Test with string oid value import/export LO Deprecated: pg_lo_create(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d Invalid OID value passed Invalid OID value passed Deprecated: pg_lo_create(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d Invalid OID value passed Invalid OID value passed OK