|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-01-22 18:53 UTC] 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');
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 10:00:01 2025 UTC |
Expected result (Correction): ----------------------------- INSERT INTO "t_test" ("c1","C2") VALUES ('0','0');