pg_lo_create
pg_lo_create
Create a large object
int **pg_lo_create** PgSql\Connection $connection mixed $object_id
int **pg_lo_create** mixed $object_id
creates a large
object and returns the of the large
object. PostgreSQL access modes
and
are not supported, the object is created always with both read and write
access.
pg_lo_create``OID``INV_READ``INV_WRITE
To use the large object interface, it is necessary to enclose it within a transaction block.
Instead of using the large object interface (which has no access controls
and is cumbersome to use), try PostgreSQL's
column type and .
bytea``pg_escape_bytea
Opmerking: > This function used to be called .
pg_locreate
connection``object_id
If an is given the function
will try to create a large object with this id, else a free
object id is assigned by the server.
object_id
A large object , return.falseforfailure.
OID
Voorbeeld: example
<?php
$database = pg_connect("dbname=jacarta");
pg_query($database, "begin");
$oid = pg_lo_create($database);
echo "$oid\n";
$handle = pg_lo_open($database, $oid, "w");
echo "$handle\n";
pg_lo_write($handle, "large object data");
pg_lo_close($handle);
pg_query($database, "commit");
?>