Origin
Iso=> \d+test; Table"public.test"Column| Type | Modifiers | Storage |Description--------+-----------------------+-----------+----------+-------------No| Character varying (32) | notnull | Extended |Name| Text | notnull | Extended |Indexes:"Test_pkey"PRIMARY KEY, Btree (No,"Name") has Oids:noiso= = INSERT INTO Test (no, Name) VALUES ("123","Jihite"); Error:column"name"of relation"Test"Does notExistline1:insert into Test (no, Name) VALUES ("123","Jihite"); ^
When inserting the table, I am prompted that I do not have the field ' name ', but I am clearly writing ' name ', can be a closer look, people are suggesting that there is no Name. This is strange, I entered the uppercase ' n ', why the hint is lowercase ' n '.
Solution
Because PostgreSQL is case-sensitive, and the SQL statement is converted to lowercase by default, everything is converted to name, whether I write name or name or name.
Then how to crack it, after all, the people actually have the name field, plus double quotation marks on the line. See Example
" Name ") VALUES ('123'jihite'1
PostgreSQL Sensitivity to field case