From:             chores at jp1 dot cx
Operating system: FreeBSD 4.7
PHP version:      4.4.4
PHP Bug Type:     PostgreSQL related
Bug description:  Column name is not double quoted

Description:
------------
Column name is not double quoted

% psql -U testuser testdb
testdb=# CREATE TABLE t_test ("c1" char(10), "C2" char(10));
testdb=# \q

% ./test.php
INSERT INTO t_test (c1,C2) VALUES ('0','0');

% psql -U testuser testdb
testdb=# INSERT INTO t_test (c1,C2) VALUES ('0','0');
ERROR:  column "c2" of relation "t_test" does not exist

Reproduce code:
---------------
(test.php)
#!/usr/local/bin/php
<?php
$db = pg_connect('dbname=testdb user=testuser');
$vals['c1'] = '0';
$vals['C2'] = '0';
echo pg_insert($db, 't_test', $vals, PGSQL_DML_STRING);
?>

Expected result:
----------------
INSERT INTO t_test (c1,"C2") VALUES ('0','0');

Actual result:
--------------
INSERT INTO t_test (c1,C2) VALUES ('0','0');

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

Reply via email to