If your goal was to compress the data, this seems counterproductive
since base64 will inflate it by 33% or more.
I would recommend using a bytea column and a prepared statement to
insert or update. This will be faster and you won't have to worry
On Sep 6, 2006, at 11:18 PM, Nathan Harmon wrote:
Thanks a lot for your help. I finally got it to work by encoding
after doing the compress -- instead of before as you suggested.
So, using a text column type:
$dataToInsert = pg_escape_string(base64_encode(gzcompress($data)));
// insert here...
// select here...
$data = base64_decode(gzuncompress($row));
John DeSoi, Ph.D.
Power Tools for PostgreSQL
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php