PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PHP » PHP_Compat » Bug #3155

[PATCH] pg_(un)escape_bytea()

Details

Request #3155[PATCH] pg_(un)escape_bytea()
Submitted2005-01-10 22:17 UTC
Fromieure at php dot net
Assignedaidan
StatusClosed
PackagePHP_Compat
PHP Version4.3.9
OSLinux
Roadmaps(Not assigned)

Comments

[2005-01-10 22:17 UTC] ieure at php dot net

Description:
------------
This patch implements pg_escape_bytea() and
pg_unescape_bytea().

These *do not* produce output identical to the native
functions. They do work just fine for me. I'm not sure how
this could even be tested, since the functions themselves
are implemented by libpq, not the pgsql PHP extension, and
could change depending on the library version.

Patch against CVS:
http://atomized.org/PEAR/Patches/PHP_Compat-pg_escape.diff

[2005-01-26 21:30 UTC] ieure at php dot net

It seems that the real function escapes more bytes than
this implementation. Unescaping works the same as the
official function.

The documentation isn't terribly clear. The real
pg_escape_bytea() seems to escape more bytes than it's
described as doing in the documentation. It's
functionality is provided by libpq, so it may be that the
documentation was written to reflect the behavior of an
earlier version.