Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pg_lo_tell(3) [php man page]

PG_LO_TELL(3)															     PG_LO_TELL(3)

pg_lo_tell - Returns current seek position a of large object

SYNOPSIS
int pg_lo_tell (resource $large_object) DESCRIPTION
pg_lo_tell(3) 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. PARAMETERS
o $large_object - PostgreSQL large object (LOB) resource, returned by pg_lo_open(3). RETURN VALUES
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. EXAMPLES
Example #1 pg_lo_tell(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); // See how far we've skipped $offset = pg_lo_tell($handle); echo "Seek position is: $offset"; pg_query($database, "commit"); ?> The above example will output: Seek position is: 50000 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_seek(3). PHP Documentation Group PG_LO_TELL(3)

Check Out this Related Man Page

PG_LO_READ_ALL(3)														 PG_LO_READ_ALL(3)

pg_lo_read_all - Reads an entire large object and send straight to browser

SYNOPSIS
int pg_lo_read_all (resource $large_object) DESCRIPTION
pg_lo_read_all(3) 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. To use the large object interface, it is necessary to enclose it within a transaction block. Note This function used to be called pg_loreadall(3). PARAMETERS
o $large_object - PostgreSQL large object (LOB) resource, returned by pg_lo_open(3). RETURN VALUES
Number of bytes read or FALSE on error. EXAMPLES
Example #1 pg_lo_read_all(3) example <?php header('Content-type: image/jpeg'); $image_oid = 189762345; $database = pg_connect("dbname=jacarta"); pg_query($database, "begin"); $handle = pg_lo_open($database, $image_oid, "r"); pg_lo_read_all($handle); pg_query($database, "commit"); ?> SEE ALSO
pg_lo_read(3). PHP Documentation Group PG_LO_READ_ALL(3)
Man Page

14 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. Shell Programming and Scripting

increment a value at an offset in hundreds very large hex file

I have a lot of very large hex files that I need to change one value at the same offset and save to another file. I have a script that finds each file and just need to put an operator for each file. I think sed might be able to do this but I have not used it before and would like some help. If... (8 Replies)
Discussion started by: Eruditass
8 Replies

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

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

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

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

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

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

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

13. Red Hat

Issues restoring a large dump file

Post deleted. (0 Replies)
Discussion started by: Nobody_knows_me
0 Replies

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