|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-23 11:07 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 21 23:00:01 2025 UTC |
Description: ------------ INSERT into BYTEA provokes: WARNING: nonstandard use of \\ in a string literal ./configure --prefix=/usr/local/httpd-2.2.8-php-5.2.5/libexec --with-config-file-path=/etc/httpd --with-apxs2=/usr/local/httpd-2.2. 8-php-5.2.5/sbin/apxs --with-zlib-dir=/usr/local --with-pgsql=/usr/local/postgresql-8.2.7 --with-db4=/usr/local/BerkeleyDB.4.6 --with-pcre-regex --with-curl --with-gd --with-jpeg-dir=/usr/ local --with-png-dir=/usr/local --without-mysql --without-sqlite --without-pear --disable-ipv6 --disable-cgi --disable-all --enable-session --enable-cli Reproduce code: --------------- CREATE TABLE t_bytea ( s_bytea BYTEA ); <?php $conn = pg_connect("dbname=test user=test password=test"); $data = pg_escape_bytea(serialize('\0 some bytea data')); pg_query($conn, "INSERT INTO t_bytea VALUES('{$data}')"); ?> Expected result: ---------------- Insertion of the bytea data which actually happens, BUT there's permanently the two lines in the PostgreSQL errorlog: WARNING: nonstandard use of \\ in a string literal at character 28 HINT: Use the escape string syntax for backslashes, e.g., E'\\'.