Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pg_lo_unlink(3) [php man page]

PG_LO_UNLINK(3) 														   PG_LO_UNLINK(3)

pg_lo_unlink - Delete a large object

SYNOPSIS
bool pg_lo_unlink (resource $connection, int $oid) DESCRIPTION
pg_lo_unlink(3) deletes a large object with the $oid. Returns TRUE on success or FALSE on failure. To use the large object interface, it is necessary to enclose it within a transaction block. Note This function used to be called pg_lounlink(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. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 pg_lo_unlink(3) example <?php // OID of the large object to delete $doc_oid = 189762345; $database = pg_connect("dbname=jacarta"); pg_query($database, "begin"); pg_lo_unlink($database, $doc_oid); pg_query($database, "commit"); ?> SEE ALSO
pg_lo_create(3), pg_lo_import(3). PHP Documentation Group PG_LO_UNLINK(3)

Check Out this Related Man Page

PG_LO_TRUNCATE(3)														 PG_LO_TRUNCATE(3)

pg_lo_truncate - Truncates a large object

SYNOPSIS
bool pg_lo_truncate (resource $large_object, int $size) DESCRIPTION
pg_lo_truncate(3) truncates a large object resource. To use the large object interface, it is necessary to enclose it within a transaction block. PARAMETERS
o $large_object - PostgreSQL large object (LOB) resource, returned by pg_lo_open(3). o $size - The number of bytes to truncate. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 pg_lo_truncate(3) example <?php $doc_oid = 189762345; $database = pg_connect("dbname=jacarta"); pg_query($database, "begin"); $handle = pg_lo_open($database, $doc_oid, "r"); // Truncate to 0 pg_lo_truncate($handle, 0); pg_query($database, "commit"); echo $data; ?> CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.6.0 | | | | | | | Added truncate function. It supports PostgreSQL | | | 9.3's 64bit large object. Both client and server | | | must support PostgreSQL 9.3 and PHP must be 64bit | | | build to use 64bit large object. | | | | +--------+---------------------------------------------------+ SEE ALSO
pg_lo_tell(3). PHP Documentation Group PG_LO_TRUNCATE(3)
Man Page

6 More Discussions You Might Find Interesting

1. 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

2. 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

3. UNIX for Dummies Questions & Answers

connection doesn't work anymore

Hello, first of all, I want to make myself clear about my language. I'm brazilian, so I ask you all to understand if i commit any mistake with the grammar. Here is the problem. Some days ago I needed to use a "sh" command in the Terminal (I use a Mac OSX 10.5.6) followed by a file... (0 Replies)
Discussion started by: anubisbr
0 Replies

4. 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

5. 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

6. 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