|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-16 06:04 UTC] iakio at mono-space dot net
[2005-01-17 05:39 UTC] edink at emini dot dk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
Description: ------------ In current cvs version pgsql_driver.c, (1.24 2004/09/23 21:15:51) pod_pgsql can't treat 8bit charactors. In this version, PQescapeBytea() is used for pgsql_handle_quoter(). But, PQescapeBytea() should be used for BYTEA data type, and, pgsql_handle_quoter() should use PQescapeString(). BYTEA literal escaped representation is different from TEXT literal escaped representation. for exsample, -- ishida=# SELECT '\101'; ?column? ---------- A (1 row) ishida=# SELECT '\\101'; ?column? ---------- \101 (1 row) ishida=# SELECT cast('\\101' as bytea); bytea ------- A (1 row) -- Release version seems good. I can not explain well because I'm not good at English, Sorry. Reproduce code: --------------- $name = <<japanese euc-jp charactor>>; $stmt = $dbh->prepare("select * from tbl where name = :name"); $stmt->bindParam(':name', $name); $stmt->execute(); Expected result: ---------------- sever log: LOG: statement: select * from tbl1 where name = <<japanese euc-jp charactor>> Actual result: -------------- sever log: LOG: statement: select * from tbl1 where name = '\\244\\242'