Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3805 closed defect (fixed)

Export vector map (table with column name, which is reserved PostgreSQL keyword) into the PostGIS database

Reported by: tmsz Owned by: grass-dev@…
Priority: normal Milestone: 7.8.0
Component: Database Version: svn-trunk
Keywords: v.out.postgis Cc:
CPU: All Platform: All

Description

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.

Attachments (1)

write_pg.description.diff (830 bytes ) - added by tmsz 5 years ago.
Patch

Download all attachments as: .zip

Change History (3)

by tmsz, 5 years ago

Attachment: write_pg.description.diff added

Patch

comment:1 by neteler, 5 years ago

Resolution: fixed
Status: newclosed

In 74386:

libvector: support reserved PostgreSQL keywords as column name by quoting when exporting vector map to PostGIS database (contributed by tmsz; fixes #3805)

comment:2 by neteler, 5 years ago

Milestone: 7.6.27.8.0
Version: svn-releasebranch76svn-trunk
Note: See TracTickets for help on using tickets.