You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error is weird as there's no column called Test, I suspect it's simply a misleading error and that the cause of the problem is that user is a reserved word that should be surrounded with ".
create table custom_table (
id SERIAL PRIMARY KEY,
firstname TEXT,
lastname TEXT
);
INSERT INTO custom_table(firstname,lastname) VALUES ('TestFirstname','TestLastname');
2020-02-11T17:23:28.993:pgsqlddbc.d:executeUpdate:670 UPDATE custom_table SET firstname="TestFirstname",lastname="TestLastname" WHERE id=0;
ddbc.core.SQLException@../../../.dub/packages/ddbc-0.5.1/ddbc/source/ddbc/drivers/pgsqlddbc.d(676): ERROR: column "TestFirstname" does not exist
LINE 1: UPDATE custom_table SET firstname="TestFirstname",lastname="...
Activity
SingingBush commentedon Feb 11, 2020
The error is weird as there's no column called Test, I suspect it's simply a misleading error and that the cause of the problem is that
useris a reserved word that should be surrounded with".I tested the SQL with https://www.db-fiddle.com/f/hroWDeZav3cgHSkwV8qUFQ/0
and found that I certainly needed to use double quotes around the tables name:
Rogni commentedon Feb 11, 2020
okey. i create test database and run
in main.d
Error:
Rogni commentedon Feb 12, 2020
why in update query used
ddbc/source/ddbc/pods.d
Line 1093 in cb72071
?
why not use
ddbc/source/ddbc/pods.d
Line 1040 in cb72071
?
Fix SQL generated by POD insert and update (#141)