diff --git a/reference/pgsql/functions/pg-lo-open.xml b/reference/pgsql/functions/pg-lo-open.xml index 8f53a87f5a..a0c7099cf2 100644 --- a/reference/pgsql/functions/pg-lo-open.xml +++ b/reference/pgsql/functions/pg-lo-open.xml @@ -1,5 +1,5 @@ - + @@ -16,12 +16,8 @@ stringmode - pg_lo_open opens a Large Object and - returns large object resource. The resource encapsulates - information about the connection. - oid specifies a valid large object oid and - mode can be either "r", "w", or "rw". It - returns &false; if there is an error. + pg_lo_open opens a large object in the database + and returns large object resource so that it can be manipulated. @@ -30,7 +26,7 @@ - To use the large object (lo) interface, it is necessary to + To use the large object interface, it is necessary to enclose it within a transaction block. @@ -39,7 +35,74 @@ + + + &reftitle.parameters; + + + + connection + + + PostgreSQL database connection resource. When + connection is not present, the default connection + is used. The default connection is the last connection made by + pg_connect or pg_pconnect. + + + + + oid + + + The OID of the large object in the database. + + + + + mode + + + Can be either "r" for read-only, "w" for write only or "rw" for read and + write. + + + + + + + + &reftitle.returnvalues; + + A large object resource or &false; on error. + + + + + &reftitle.examples; + + + <function>pg_lo_open</function> example + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-lo-read-all.xml b/reference/pgsql/functions/pg-lo-read-all.xml index 11af539270..3f214612b9 100644 --- a/reference/pgsql/functions/pg-lo-read-all.xml +++ b/reference/pgsql/functions/pg-lo-read-all.xml @@ -1,5 +1,5 @@ - + @@ -19,11 +19,10 @@ pg_lo_read_all reads a large object and passes it straight through to the browser after sending all pending headers. Mainly intended for sending binary data like images or - sound. It returns number of bytes read. It returns &false;, if an - error occurred. + sound. - To use the large object (lo) interface, it is necessary to + To use the large object interface, it is necessary to enclose it within a transaction block. @@ -33,6 +32,52 @@ + + &reftitle.parameters; + + + + large_object + + + PostgreSQL large object (LOB) resource, returned by pg_lo_open. + + + + + + + + + + &reftitle.returnvalues; + + Number of bytes read or &false; on error. + + + + + &reftitle.examples; + + + <function>pg_lo_read_all</function> example + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-lo-read.xml b/reference/pgsql/functions/pg-lo-read.xml index a3e2030c32..61c83fefc1 100644 --- a/reference/pgsql/functions/pg-lo-read.xml +++ b/reference/pgsql/functions/pg-lo-read.xml @@ -1,5 +1,5 @@ - + @@ -16,14 +16,11 @@ pg_lo_read reads at most - len (defaults to 8192) bytes from a large object and - returns it as a string. large_object specifies a - valid large object resource andlen - specifies the maximum allowable size of the large object - segment. It returns &false; if there is an error. + len bytes from a large object and + returns it as a string. - To use the large object (lo) interface, it is necessary to + To use the large object interface, it is necessary to enclose it within a transaction block. @@ -33,6 +30,60 @@ + + &reftitle.parameters; + + + + large_object + + + PostgreSQL large object (LOB) resource, returned by pg_lo_open. + + + + + len + + + An optional maximum number of bytes to return. Defaults to 8192. + + + + + + + + + &reftitle.returnvalues; + + A string containing len bytes from the + large object, or &false; on error. + + + + + &reftitle.examples; + + + <function>pg_lo_read</function> example + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-lo-seek.xml b/reference/pgsql/functions/pg-lo-seek.xml index d684c2b14d..350df5e428 100644 --- a/reference/pgsql/functions/pg-lo-seek.xml +++ b/reference/pgsql/functions/pg-lo-seek.xml @@ -1,11 +1,11 @@ - + pg_lo_seek - Seeks position of large object + Seeks position within a large object @@ -18,12 +18,81 @@ intwhence - pg_lo_seek seeks position of large object - resource. whence is PGSQL_SEEK_SET, - PGSQL_SEEK_CUR or PGSQL_SEEK_END. + pg_lo_seek seeks a position within a large object + resource. + + + To use the large object interface, it is necessary to + enclose it within a transaction block. + + &reftitle.parameters; + + + + large_object + + + PostgreSQL large object (LOB) resource, returned by pg_lo_open. + + + + + offset + + + The number of bytes to seek. + + + + + whence + + + One of the constants PGSQL_SEEK_SET (seek from object start), + PGSQL_SEEK_CUR (seek from current position) + or PGSQL_SEEK_END (seek from object end) . + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + <function>pg_lo_seek</function> example + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-lo-tell.xml b/reference/pgsql/functions/pg-lo-tell.xml index f41298261f..7f8626cd84 100644 --- a/reference/pgsql/functions/pg-lo-tell.xml +++ b/reference/pgsql/functions/pg-lo-tell.xml @@ -1,11 +1,11 @@ - + pg_lo_tell - Returns current position of large object + Returns current seek position a of large object @@ -16,11 +16,70 @@ resourcelarge_object - pg_lo_tell returns current position (offset - from the beginning of large object). + pg_lo_tell returns the current position (offset + from the beginning) of a large object. + + + To use the large object interface, it is necessary to + enclose it within a transaction block. + + &reftitle.parameters; + + + + large_object + + + PostgreSQL large object (LOB) resource, returned by pg_lo_open. + + + + + + + + + &reftitle.returnvalues; + + The current seek offset (in number of bytes) from the beginning of the large + object. If there is an error, the return value is negative. + + + + + &reftitle.examples; + + + <function>pg_lo_tell</function> example + + +]]> + + &example.outputs; + + + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-lo-unlink.xml b/reference/pgsql/functions/pg-lo-unlink.xml index 2dba51bd33..c9fca84f2d 100644 --- a/reference/pgsql/functions/pg-lo-unlink.xml +++ b/reference/pgsql/functions/pg-lo-unlink.xml @@ -1,5 +1,5 @@ - + @@ -19,16 +19,71 @@ oid. &return.success; - To use the large object (lo) interface, it is necessary to + To use the large object interface, it is necessary to enclose it within a transaction block. - This function used to be called pg_lo_unlink(). + This function used to be called pg_lounlink(). + + &reftitle.parameters; + + + + connection + + + PostgreSQL database connection resource. When + connection is not present, the default connection + is used. The default connection is the last connection made by + pg_connect or pg_pconnect. + + + + + oid + + + The OID of the large object in the database. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + <function>pg_lo_unlink</function> example + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-lo-write.xml b/reference/pgsql/functions/pg-lo-write.xml index 32f86f6ed3..08fb18ac81 100644 --- a/reference/pgsql/functions/pg-lo-write.xml +++ b/reference/pgsql/functions/pg-lo-write.xml @@ -1,10 +1,10 @@ - + pg_lo_write - Write a large object + Write to a large object @@ -16,14 +16,11 @@ intlen - pg_lo_write writes at most to a large object - from a variable data and returns the number - of bytes actually written, or &false; in the case of an error. - large_object is a large object resource - from pg_lo_open. + pg_lo_write writes data into a large object + at the current seek position. - To use the large object (lo) interface, it is necessary to + To use the large object interface, it is necessary to enclose it within a transaction block. @@ -33,6 +30,71 @@ + + &reftitle.parameters; + + + + large_object + + + PostgreSQL large object (LOB) resource, returned by pg_lo_open. + + + + + data + + + The data to be written to the large object. If len is + specified and is less than the length of data, only + len bytes will be written. + + + + + len + + + An optional maximum number of bytes to write. Must be greater than zero + and no greater than the length of data. Defaults to + the length of data. + + + + + + + + + &reftitle.returnvalues; + + The number of bytes written to the large object, or &false; on error. + + + + + &reftitle.examples; + + + <function>pg_lo_write</function> example + + +]]> + + + + + &reftitle.seealso;