OGR2OGR - Postgre import with -nlt flag set to NONE doesn't create a record in geometry_columns anymore
|Reported by:||hsenot||Owned by:||Even Rouault|
Description (last modified by )
The following command has different results in different versions of the driver:
ogr2ogr -f "PostgreSQL" %CS% "test.tab" -nlt NONE -nln test_table
- 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 (12)
comment:2 Changed 6 years ago by
|Component:||default → OGR_SF|
|Owner:||changed from warmerdam to Even Rouault|