|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44504 bytea - nonstandard use of \\ in a string literal
Submitted: 2008-03-22 15:56 UTC Modified: 2008-03-23 11:07 UTC
From: cei at yourshop dot com Assigned:
Status: Not a bug Package: PostgreSQL related
PHP Version: 5.2.5 OS: FreeBSD 6.3 amd64, i386
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
23 - 11 = ?
Subscribe to this entry?

 [2008-03-22 15:56 UTC] cei at yourshop dot com
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 );

$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'\\'.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 18:01:30 2024 UTC