[GRASS-dev] [GRASS GIS] #3805: Export vector map (table with column name, which is reserved PostgreSQL keyword) into the PostGIS database

#3805: Export vector map (table with column name, which is reserved PostgreSQL
keyword) into the PostGIS database
---------------------------+---------------------------------
Reporter: tmsz | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.6.2
Component: Database | Version: svn-releasebranch76
Keywords: v.out.postgis | CPU: All
Platform: All |
---------------------------+---------------------------------
I work with openstreemap vector line map "planet_osm_line" imported from
PostGIS database into the GRASS GIS. If I want export (via v.out.postgis)
this vector map back into the PostGIS database I got error message
(because one of the table column name is "NATURAL", which is reserved
PostgreSQL database keyword, according
https://www.postgresql.org/docs/current/sql-keywords-appendix.html)
I write patch which enclose column name in double-quotes in the sql
command during export.

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

#3805: Export vector map (table with column name, which is reserved PostgreSQL
keyword) into the PostGIS database
-----------------------+---------------------------------
  Reporter: tmsz | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.6.2
Component: Database | Version: svn-releasebranch76
Resolution: | Keywords: v.out.postgis
       CPU: All | Platform: All
-----------------------+---------------------------------
Changes (by tmsz):

* Attachment "write_pg.description.diff" added.

Patch

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

#3805: Export vector map (table with column name, which is reserved PostgreSQL
keyword) into the PostGIS database
-----------------------+---------------------------------
  Reporter: tmsz | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.6.2
Component: Database | Version: svn-releasebranch76
Resolution: fixed | Keywords: v.out.postgis
       CPU: All | Platform: All
-----------------------+---------------------------------
Changes (by neteler):

* status: new => closed
* resolution: => fixed

Comment:

In [changeset:"74386" 74386]:
{{{
#!CommitTicketReference repository="" revision="74386"
libvector: support reserved PostgreSQL keywords as column name by quoting
when exporting vector map to PostGIS database (contributed by tmsz; fixes
#3805)
}}}

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

#3805: Export vector map (table with column name, which is reserved PostgreSQL
keyword) into the PostGIS database
-----------------------+---------------------------
  Reporter: tmsz | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.8.0
Component: Database | Version: svn-trunk
Resolution: fixed | Keywords: v.out.postgis
       CPU: All | Platform: All
-----------------------+---------------------------
Changes (by neteler):

* version: svn-releasebranch76 => svn-trunk
* milestone: 7.6.2 => 7.8.0

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