Opened 7 years ago

Closed 15 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

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 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

Milestone: 7.0.07.0.5

comment:4 Changed 3 years ago by neteler

Milestone: 7.0.57.0.6

comment:5 Changed 22 months ago by neteler

Milestone: 7.0.67.0.7

comment:6 Changed 15 months ago by martinl

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

comment:7 Changed 15 months ago by martinl

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