Home » PHP » PHP_Compat » Bug #3155
[PATCH] pg_(un)escape_bytea()
Details
| Request #3155 | [PATCH] pg_(un)escape_bytea() |
|---|---|
| Submitted | 2005-01-10 22:17 UTC |
| From | ieure at php dot net |
| Assigned | aidan |
| Status | Closed |
| Package | PHP_Compat |
| PHP Version | 4.3.9 |
| OS | Linux |
| 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.