Bug #51608 [NEW]: pg_copy_to: WARNING: nonstandard use of \\ in a string literal

From: Date: Tue, 20 Apr 2010 00:16:12 +0000
Subject: Bug #51608 [NEW]: pg_copy_to: WARNING: nonstandard use of \\ in a string literal
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-149710@lists.php.net to get a copy of this message
From:             
Operating system: Linux
PHP version:      5.3.2
Package:          PostgreSQL related
Bug Type:         Bug
Bug description:pg_copy_to: WARNING: nonstandard use of \\ in a string literal

Description:
------------
Whenever I use pg_copy_to() on PostgreSQL 8.4.2 I get a warning in
/var/lib/pgsql/data/postmaster.log:

> WARNING:  nonstandard use of \\ in a string literal at character 62
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.

This is caused by the SQL generated in pg_copy_to.

r277069 addressed this issue for pg_copy_from and should also be applied to
pg_copy_to.

Test script:
---------------
// setup
pg_query($db, 'CREATE TEMP TABLE temp_test_table (a INT)');
pg_query($db, 'INSERT INTO temp_test_table VALUES (1)');

// test
$rows = pg_copy_to($db, 'temp_test_table');



-- 
Edit bug report at http://bugs.php.net/bug.php?id=51608&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=51608&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=51608&r=trysnapshot53
Try a snapshot (PHP 6.0):            http://bugs.php.net/fix.php?id=51608&r=trysnapshot60
Fixed in SVN:                        http://bugs.php.net/fix.php?id=51608&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51608&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=51608&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=51608&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=51608&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=51608&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=51608&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=51608&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=51608&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=51608&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=51608&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51608&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51608&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=51608&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=51608&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=51608&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=51608&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=51608&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#149710) next »