PG_LO_TELL(3)PG_LO_TELL(3)pg_lo_tell - Returns current seek position a of large objectSYNOPSIS
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_WRITE(3)PG_LO_WRITE(3)pg_lo_write - Write to a large objectSYNOPSIS
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)