#40198 [Opn]: Column name is not double quoted
| From: | chores at jp1 dot cx | Date: | Tue, 23 Jan 2007 00:26:26 +0000 |
| Subject: | #40198 [Opn]: Column name is not double quoted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107916@lists.php.net to get a copy of this message | ||
ID: 40198
User updated by: chores at jp1 dot cx
Reported By: chores at jp1 dot cx
Status: Open
Bug Type: PostgreSQL related
Operating System: FreeBSD 4.7
PHP Version: 4.4.4
New Comment:
Expected result (Correction):
-----------------------------
INSERT INTO "t_test" ("c1","C2") VALUES ('0','0');
Previous Comments:
------------------------------------------------------------------------
[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