Opened 13 years ago

Last modified 13 years ago

#4012 closed defect

OGR2OGR - Postgre import with -nlt flag set to NONE doesn't create a record in geometry_columns anymore — at Initial Version

Reported by: hsenot Owned by: warmerdam
Priority: normal Milestone: 1.8.1
Component: OGR_SF Version: 1.8.0
Severity: normal Keywords: ogr2ogr pg
Cc:

Description

The following command has different results in different versions of the driver: ogr2ogr -f "PostgreSQL" %CS% "test.tab" -nlt NONE -nln test_table where:

  • test.tab is a MapInfo file containing a non-spatial layer (just a regular table)
  • CS="PG:host='localhost' port='54321' dbname='test_ogr' user='test_ogr' password='test_ogr'"

In GDAL 1.7.1, released 2010/02/08, a record is inserted in geometry_columns. But in both in:

  • GDAL 1.8.0, released 2011/01/12
  • GDAL 1.9dev, released 2011/01/18

no record is inserted.

This makes it difficult to use OGR2OGR to update/append non-spatial objects. The driver looks for a record in geometry_columns to choose between a create statement (if no record) or an update statement (if record exists) - with the behaviour of driver >= 1.8, it attempts a create on an existing table and thus fails the ogr2ogr statement.

Change History (5)

by hsenot, 13 years ago

Attachment: test_PG.bat added

Windows script to reproduce behaviour

by hsenot, 13 years ago

Attachment: test_run.log added

Script log on 1.7.1

by hsenot, 13 years ago

Attachment: test_run.2.log added

Script log on 1.9dev

by hsenot, 13 years ago

Attachment: test_run.3.log added

Script log on 1.8

by hsenot, 13 years ago

Attachment: test.7z added

Zip of the non-spatial MapInfo file used

Note: See TracTickets for help on using tickets.