Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pg_lo_seek(3) [php man page]

PG_LO_SEEK(3)															     PG_LO_SEEK(3)

pg_lo_seek - Seeks position within a large object

SYNOPSIS
bool pg_lo_seek (resource $large_object, int $offset, [int $whence = PGSQL_SEEK_CUR]) DESCRIPTION
pg_lo_seek(3) seeks a position within 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 $offset - The number of bytes to seek. o $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) . RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 pg_lo_seek(3) example <?php $doc_oid = 189762345; $database = pg_connect("dbname=jacarta"); pg_query($database, "begin"); $handle = pg_lo_open($database, $doc_oid, "r"); // Skip first 50000 bytes pg_lo_seek($handle, 50000, PGSQL_SEEK_SET); // Read the next 10000 bytes $data = pg_lo_read($handle, 10000); pg_query($database, "commit"); echo $data; ?> CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.6.0 | | | | | | | Added PostgreSQL 9.3's 64bit large object sup- | | | port. Both client and server must support Post- | | | greSQL 9.3 and PHP must be 64bit build to use | | | 64bit large object. | | | | +--------+---------------------------------------------------+ SEE ALSO
pg_lo_tell(3). PHP Documentation Group PG_LO_SEEK(3)

Check Out this Related Man Page

PG_LO_WRITE(3)															    PG_LO_WRITE(3)

pg_lo_write - Write to a large object

SYNOPSIS
int pg_lo_write (resource $large_object, string $data, [int $len]) DESCRIPTION
pg_lo_write(3) writes data into a large object at the current seek position. To use the large object interface, it is necessary to enclose it within a transaction block. Note This function used to be called pg_lowrite(3). PARAMETERS
o $large_object - PostgreSQL large object (LOB) resource, returned by pg_lo_open(3). o $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. o $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. RETURN VALUES
The number of bytes written to the large object, or FALSE on error. EXAMPLES
Example #1 pg_lo_write(3) example <?php $doc_oid = 189762345; $data = "This will overwrite the start of the large object."; $database = pg_connect("dbname=jacarta"); pg_query($database, "begin"); $handle = pg_lo_open($database, $doc_oid, "w"); $data = pg_lo_write($handle, $data); pg_query($database, "commit"); ?> SEE ALSO
pg_lo_create(3), pg_lo_open(3). PHP Documentation Group PG_LO_WRITE(3)
Man Page

13 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

32bit vs 64bit

Whats the difference between 32bit and 64bit OS's or applications. I understand it a little but its just not clicking the way the teacher explained to me thanks, any info would be much appreciated (1 Reply)
Discussion started by: eloquent99
1 Replies

2. UNIX for Dummies Questions & Answers

Help with grepping and line number

I need help with extracting data from a large file ~900mb. Below is how the data looks like, line number value 1001 10000 ... ... 5001 50000 6001 60000 ... ... 10001 100000 ... ... 100001 ... (3 Replies)
Discussion started by: shabs1985
3 Replies

3. Solaris

How to set stack for Oracle's user?

Hi all! I've got a problem. Primary: Sun Sparc V890, 64bit Standby: HP-Proliant ML 350, 64bit In the machine that I've got configured physical standby database, the alert_log_file point me one error: Sat Feb 28 00:40:08 2009 ORA-00202: control file:... (5 Replies)
Discussion started by: trantuananh24hg
5 Replies

4. Red Hat

How do i install swftools with rhel5.3 64bit

Hi: I am very sorry,I am not good at english. Please help me,I use rhel5.3 64bit OS,I can not combine swftools-0.9.0.tar.gz; but I use rhel5.3 32bit OS,I done. anybody have some question. Thanks (0 Replies)
Discussion started by: wwwyangshengjun
0 Replies

5. Solaris

Mmap with fork : Resource unavaialable temporarily

installed 64bit 16GB VM on 64bit ESX server. Written small C code to map the 2GB of memory by mmap after creating 3 child and map getting failed by throwing "resource unavailable temporarily" after mapping 1.6 GB of memory out of 2GB. But same 1.5Gb memory mapping works fine. I checked... (0 Replies)
Discussion started by: siddharoodh
0 Replies

6. UNIX for Advanced & Expert Users

Aix pid issue

Hi I have an IBM AIX 5.3 64Bit running with 64bit application (Kernel runs on 64bit also). I changed the maximum proccesses per user to the maximum. Currently the pids of proccesses in the system using 5 digits (<100000). Is it possible to make the system use pids bigger then 4500000? I need it... (6 Replies)
Discussion started by: idana
6 Replies

7. Red Hat

Pthread problems, 32bit vs 64bit

I have an application which builds and executes without error on a 32bit implementation of Linux. When I transferred the code to a new project on a 64bit implementation, the code will build without error, but the pthread functions, such as pthread_attr_setschedparam() return an 'Invalid Argument'... (3 Replies)
Discussion started by: jpelletier116
3 Replies

8. Solaris

Compiler - 32bit or 64bit?

Hi Gurus, I need to check whether the compiler installed in my system supports 64bit compilation. Server - Sun fire v490 OS - Solaris 5.9 Processor - Sparcv9 (64bit) Install Directory - /opt/SUNWSpro Compiler Model - Sun Forte C Compiler. My development team is claiming that there... (20 Replies)
Discussion started by: Hari_Ganesh
20 Replies

9. AIX

convert 32 bit shared library to 64bit

Hi I have .so & .o files which got compiled in 32bit environment; Is there any way to translate the above files to 64bit ; We are using AIX version 6 Thanks (1 Reply)
Discussion started by: mKarri
1 Replies

10. UNIX for Dummies Questions & Answers

Using cvsup on a 64bit-OpenBSD

After doing some searching I noticed there doesnt seem to be a 64bit version of cvsup & it seems that the other utility thats used "csup" doesnt have as many options. So what would be the best option for installing & upgrading pkgs or ports. Can you still install "cvsup" & does it matter if its... (0 Replies)
Discussion started by: Browser
0 Replies

11. AIX

AIX IP security question

Recently the network auditor found a security hole at port 50000. The port 50000 is used by db2. When I enter command "netstat -Aan |grep 50000", it showed some established connections and are all db2 processes. I have asked the application team and they answered that the port 50000 connection... (2 Replies)
Discussion started by: skeyeung
2 Replies

12. Programming

Need help on Insert data to mySQL database

Hi guys, I would like to seek help on inserting data whenever the switch is on or off to my sensor mySQL database in phpMyAdmin from my control.php. I'm using Raspberry PI as my hardware and follow a few tutorials to create my own Web Control Interface, it works perfectly without insert method.... (1 Reply)
Discussion started by: aoiregion
1 Replies

13. Solaris

Compile 64bit Murrine Theme Engine

Hi I am trying to compile a 64bit version of the Murrine theme engine on Solaris 11.3 I can compile the 32bit version successfully. uname -a gives me: I unzip the zip file from murrine on github Then I change directory to it. Then I export my path to include ... (3 Replies)
Discussion started by: aubreybourke
3 Replies