Opened 7 years ago

Closed 23 months ago

#1930 closed defect (wontfix)

Quote column names when creating tables via sqlite

Reported by: scw Owned by: grass-dev@…
Priority: normal Milestone: 7.0.7
Component: Database Version: unspecified
Keywords: sqlite, SQL Cc:
CPU: Unspecified Platform: Unspecified


I have an input table which includes the column 'unique', and it failed to import, with the error:

DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "varchar": syntax error

This is due to "unique" being a reserved keyword in SQLite. This can be fixed by quoting column names prior to passing them to SQLite, see this page for details:

Change History (7)

comment:1 Changed 7 years ago by hamish

Component: DefaultDatabase
Keywords: sqlite added

comment:2 Changed 6 years ago by neteler

Keywords: SQL added

For SQL reserved word collisions, see also #1755 and #578

comment:3 Changed 4 years ago by martinl


comment:4 Changed 4 years ago by neteler


comment:5 Changed 2 years ago by neteler


comment:6 Changed 23 months ago by martinl

No activity for a long time. Closing. Feel free to reopen if needed.

comment:7 Changed 23 months ago by martinl

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.