ID:               40198
 Updated by:       [EMAIL PROTECTED]
 Reported By:      chores at jp1 dot cx
-Status:           Open
+Status:           Assigned
 Bug Type:         PostgreSQL related
 Operating System: FreeBSD 4.7
 PHP Version:      4.4.4
-Assigned To:      
+Assigned To:      yohgaki


Previous Comments:
------------------------------------------------------------------------

[2007-01-23 00:26:25] chores at jp1 dot cx

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

------------------------------------------------------------------------

[2007-01-22 18:53:33] chores at jp1 dot cx

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 this bug report at http://bugs.php.net/?id=40198&edit=1

Reply via email to