Opened 12 years ago

Closed 6 years 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

Description

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:

http://www.sqlite.org/lang_keywords.html

Change History (7)

comment:1 by hamish, 12 years ago

Component: DefaultDatabase
Keywords: sqlite added

comment:2 by neteler, 11 years ago

Keywords: SQL added

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

comment:3 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:4 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:5 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:6 by martinl, 6 years ago

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

comment:7 by martinl, 6 years ago

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