PG_LO_TRUNCATE(3)PG_LO_TRUNCATE(3)pg_lo_truncate - Truncates a large objectSYNOPSIS
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)
Check Out this Related Man Page
PG_LO_SEEK(3)PG_LO_SEEK(3)pg_lo_seek - Seeks position within a large objectSYNOPSIS
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)
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)
what does this command do ? as in
does this command just make sure everything in the file is executed?
or does it flush the file?
Actually this is used on a file in a progress database but I believe it is a unix command? (2 Replies)
Hello,
I need to truncate a large file without deleting and touching it again.
i tried the below commands but no use because of the huge file size
cat <<! > errors
and
echo > errors
Could someone please help.
Thanks,
Sateesh (1 Reply)
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)
Hi
I have a 64bit C++ dynamic component built using Sun Forte compiler(CC) on one server.
I am opening this shared component using dlopen and checking if a particular function is defined or not. After that, when I am closing the component using dlclose, the program is crashing.
The... (3 Replies)
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)
Is it possible to compile the same source code on 32bit and 64bit systems?
I'm trying to compile OpenLDAP on AIX 5.3 64 bit with gcc but I get a memory fault when sarting it and I think it is caused by a 32bit vs 64bit problem. (1 Reply)
Ok, I am new to UNIX and Shell scripting and I am trying to do the following using a korn shell script:
I have a large data file that is loaded into a database, this data file is split into parts to make it more manageable based on a size parameter. The file contains many account records, the... (1 Reply)
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 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)
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)