Quotation marks for name columns in web.db for postgresql
Bug #600164 reported by
Martin Janda
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
web.py |
New
|
Undecided
|
Unassigned |
Bug Description
web.db for postgresql writes the column names in SQL as:
INSERT INTO log_changes (action, user, time) VALUES ...
But what if the column name is from the keyword as a column 'user' in the example?
Solution is to add double quotes around column name. For example:
INSERT INTO log_changes ("action", "user", "time") VALUES ...
Yes, I know, now it can be solved by using web.db.query method.
To post a comment you must log in.
This issue is moved to github issues.
https:/ /github. com/webpy/ webpy/issues# issue/32