Edit report at https://bugs.php.net/bug.php?id=59831&edit=1
ID: 59831
Comment by: dregad at mantisbt dot org
Reported by: brunofr at ioda dot net
Summary: pdo_pgsql doesn't understand the new bytea output
hex for postgresql 9x
Status: Not a bug
Type: Bug
Package: PDO related
Operating System: All (linux/Windows)
PHP Version: 5_3 SVN-2011-06-28 (dev)
Block user comment: N
Private report: N
New Comment:
Could someone kindly clarify exactly what version of the libpq library one
needs to have, in order for PHP to recognize the 'hex' format ?
According to my phpinfo(), PostgreSQL(libpq) Version is 9.1.9, yet if I don't
SET bytea_output TO escape, it does not work for me.
Cheers
Previous Comments:
------------------------------------------------------------------------
[2013-06-01 19:09:17] [email protected]
PHP uses the functionality from libpq to decode bytea columns. If you have an
old version that doesn't support hex bytea and you can't upgrade it, I'd
suggest using something like:
ALTER DATABASE foo SET bytea_output TO 'escape';
or
ALTER ROLE bar SET bytea_output TO 'escape';
------------------------------------------------------------------------
[2013-02-28 17:01:40] goetas at lignano dot it
It depends if your client lib is up to date.
If you use Postgresql 9x PDO client libs have to be updated too.
------------------------------------------------------------------------
[2011-06-28 07:42:45] brunofr at ioda dot net
Description:
------------
Postgresql 9x set bytea_ouput = hex by default now.
This lead to a numerous trouble for a lot of application using pdo
Has been seen in major project like Drupal
http://drupal.org/node/926636
Reproduce code:
---------------
setup a default database and a table with a bytea column
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=59831&edit=1