Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pg_lo_export(3) [php man page]

PG_LO_EXPORT(3) 														   PG_LO_EXPORT(3)

pg_lo_export - Export a large object to file

SYNOPSIS
bool pg_lo_export ([resource $connection], int $oid, string $pathname) DESCRIPTION
pg_lo_export(3) takes a large object in a PostgreSQL database and saves its contents to a file on the local filesystem. To use the large object interface, it is necessary to enclose it within a transaction block. Note This function used to be called pg_loexport(3). PARAMETERS
o $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(3) or pg_pconnect(3). o $oid - The $OID of the large object in the database. o $pathname - The full path and file name of the file in which to write the large object on the client filesystem. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 pg_lo_export(3) example <?php $database = pg_connect("dbname=jacarta"); pg_query($database, "begin"); $oid = pg_lo_create($database); $handle = pg_lo_open($database, $oid, "w"); pg_lo_write($handle, "large object data"); pg_lo_close($handle); pg_lo_export($database, $oid, '/tmp/lob.dat'); pg_query($database, "commit"); ?> SEE ALSO
pg_lo_import(3). PHP Documentation Group PG_LO_EXPORT(3)

Check Out this Related Man Page

PG_LO_IMPORT(3) 														   PG_LO_IMPORT(3)

pg_lo_import - Import a large object from file

SYNOPSIS
int pg_lo_import ([resource $connection], string $pathname, [mixed $object_id]) DESCRIPTION
pg_lo_import(3) creates a new large object in the database using a file on the filesystem as its data source. To use the large object interface, it is necessary to enclose it within a transaction block. Note When safe mode is enabled, PHP checks whether the files or directories being operated upon have the same UID (owner) as the script that is being executed. Note This function used to be called pg_loimport(3). PARAMETERS
o $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(3) or pg_pconnect(3). o $pathname - The full path and file name of the file on the client filesystem from which to read the large object data. o $object_id - If an $object_id is given the function will try to create a large object with this id, else a free object id is assigned by the server. The parameter was added in PHP 5.3 and relies on functionality that first appeared in PostgreSQL 8.1. RETURN VALUES
The $OID of the newly created large object, or FALSE on failure. CHANGELOG
+--------+-------------------------------------+ |Version | | | | | | | Description | | | | +--------+-------------------------------------+ | 5.3.0 | | | | | | | The optional $object_id was added. | | | | +--------+-------------------------------------+ EXAMPLES
Example #1 pg_lo_import(3) example <?php $database = pg_connect("dbname=jacarta"); pg_query($database, "begin"); $oid = pg_lo_import($database, '/tmp/lob.dat'); pg_query($database, "commit"); ?> SEE ALSO
pg_lo_export(3), pg_lo_open(3). PHP Documentation Group PG_LO_IMPORT(3)
Man Page

10 More Discussions You Might Find Interesting

1. HP-UX

large file options is set

Can someone tell me the right or exact syntax to check if the large file options is set on a filesystem Thanks! (2 Replies)
Discussion started by: catwomen
2 Replies

2. UNIX for Dummies Questions & Answers

Editing a large size file

I would like to edit a doc which is large file size. I can't use "vi" command due to out of memory. $ vi large.dat ex: 0602-101 Out of memory saving lines for undo. Please help. Thanks. (2 Replies)
Discussion started by: Rock
2 Replies

3. Shell Programming and Scripting

input variable like POST in PHP possibly?

I have a very large database and once in awhile the database auto loading scripts that update the database for the daily updates fails and I have to go in and manually fix it but when that happens I usually have to start from scratch on sundays I have access to a weekly database rebuild. Then I... (3 Replies)
Discussion started by: chadrt
3 Replies

4. UNIX for Advanced & Expert Users

database connection (unresolved sqlcxt)

i have a little pro*c code (as shown below) to connect an oracle database. (in unix solaris platform) in the preprocessor compilation step everything is ok. but when i try to compile the code using cc i get the error below: ld: Unresolved: sqlcxt i think there is a problem while linking... (3 Replies)
Discussion started by: gfhgfnhhn
3 Replies

5. Shell Programming and Scripting

sed: removing any and all trailing digits?

We have a large number of oracle database related scripts that utilize the environment variables $ORACLE_SID and $DBNAME. In a single instance database the $ORACLE_SID is the same as the database name $DBNAME. So we have simply set DBNAME = $ORACLE_SID. However, now that we are clustering with RAC,... (5 Replies)
Discussion started by: Squeakygoose
5 Replies

6. HP-UX

Encrypting DataBase Passwords

Hi All We have got a HUGE process of securing our infrastructure(primarily the database) We basically establish connection to oracle database from our UNIX shell scripts when we do ps -ef | grep sqlplus it blurts out all the credentials as output. sqplus username/password@server ... (1 Reply)
Discussion started by: b_sri
1 Replies

7. Shell Programming and Scripting

Function returns wrong values - solved

Hi I have a small function which returns a wrong value. The function tries to make a connection to oracle database and tries to get the open_mode of the database in the variable status. However when a database is down the value of the status column is set to READWRITE i am not sure why. I... (0 Replies)
Discussion started by: xiamin
0 Replies

8. Shell Programming and Scripting

deleting dupes in a row

Hello, I have a large database in which name homonyms are arranged in a row. Since the database is large and generated by hand, very often dupes creep in. I want to remove the dupes either using an awk or perl script. An input is given below The expected output is given below: As can be... (2 Replies)
Discussion started by: gimley
2 Replies

9. Shell Programming and Scripting

Remove inverted duplicates from a mapping database

My excuses for a Title which does not really describe what I need. My OS is Windows Vista/Windows7 I have a large database of homographs with the following structure: name=name variant i.e. a variant of a name is provided on a line separated by a =. An example will make this clear ... (1 Reply)
Discussion started by: gimley
1 Replies

10. UNIX for Advanced & Expert Users

Small database that can be bundled with UNIX

Hi All, I am working on a file transfer tool between unix servers. for this i am looking for a small database which is free and compatible with all unix OS and can be bundled in a package with other scripts. Any suggestions (8 Replies)
Discussion started by: Jcpratap
8 Replies