|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-03-31 06:04 UTC] yohgaki@php.net
-Status: Open
+Status: Wont fix
-Assigned To:
+Assigned To: yohgaki
[2012-03-31 06:04 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 14:00:01 2025 UTC |
Description: ------------ My understanding of pg_escape_string() is that it will escape only those characters that require escaping by the postgresql database. Using standard_conforming_strings=on in postgres (8.2.4) a "\" (backslash) character is just a backslash character, not a special character requiring escaping. Therefore, I do not think pg_escape_string('\') should return '\\' but rather '\'. The only way I can see to enter a single backslash character is to use the E('\\') syntax but I should not have do so. Test script: --------------- <?php print pg_escape_string(' \ '); ?> Expected result: ---------------- should return ' \ ' Actual result: -------------- returns ' \\ '