note 15709 modified in function.pg-loexport by yohgaki

From: Date: Mon, 10 Dec 2001 17:40:11 +0000
Subject: note 15709 modified in function.pg-loexport by yohgaki
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22446@lists.php.net to get a copy of this message
After hours of headache, I finally realised that pg_loexport sometimes returns true even if the BLOB was not exported. I worked around the problem by changing the code to pg_exec("BEGIN"); pg_loexport($bloboid,$filename,$dblink); pg_exec("COMMIT"); if(!file_exists($filename)) { //deal with non-existent file } The only way i could get pg_loexport to return FALSE was to alter the file permissions on the directory in which the BLOB was being written. Be Warned!!! --was-- After hours of headache, I finally realised that pg_loexport sometimes returns true even if the BLOB was not exported. I worked around the problem by changing the code to pg_exec("BEGIN"); pg_loexport($bloboid,$filename,$dblink); pg_exec("COMMIT"); if(!file_exists($filename)) { //deal with non-existent file } The only way i could get pg_loexport to return FALSE was to alter the file permissions on the directory in which the BLOB was being written. Be Warned!!! [Editor's Note] PostgreSQL requires transaction for handling large objects. http://www.php.net/manual/en/function.pg-loexport.php

« previous php.notes (#22446) next »