[GRASS-dev] [GRASS GIS] #1930: Quote column names when creating tables via sqlite

#1930: Quote column names when creating tables via sqlite
-------------------------+--------------------------------------------------
Reporter: scw | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: 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:
   http://www.sqlite.org/lang_keywords.html

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1930&gt;
GRASS GIS <http://grass.osgeo.org>

#1930: Quote column names when creating tables via sqlite
-------------------------+--------------------------------------------------
Reporter: scw | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Database | Version: unspecified
Keywords: sqlite | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by hamish):

  * keywords: => sqlite
  * component: Default => Database

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1930#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1930: Quote column names when creating tables via sqlite
-------------------------+--------------------------------------------------
Reporter: scw | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Database | Version: unspecified
Keywords: sqlite, SQL | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by neteler):

  * keywords: sqlite => sqlite, SQL

Comment:

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1930#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>