id summary reporter owner description type status priority milestone component version severity resolution keywords cc 6366 -lco GEOMETRY_NAME ignored when importing FileGDB (with not null constraint on geometry column) to PostGIS saultdon warmerdam "I rebuilt GDAL this morning from https://svn.osgeo.org/gdal/branches/2.0/gdal and I tried to update or replace existing table in a PostGIS database. I tried DROP CASCADE original table and copy a new table when -update didn't work but it ignores the -lco GEOMETRY_NAME=geom flag. The datasource I have is a FileGDB and trying to insert a table into a PostgreSQL 9.5/PostGIS 2.2.1. The command I'm using is: {{{ ogr2ogr -gt 65536 -f PostgreSQL pg:""host=${host} dbname=${db} port=${port}"" dgtl_road_atlas.gdb DGTL_ROAD_ATLAS_MPAR_SP -nln ${schema}.dra_mpar_sp -nlt PROMOTE_TO_MULTI -progress -lco GEOMETRY_NAME=geom -a_srs ""EPSG:3005"" -unsetFid }}} But the resultant GEOMETRY columns name is ""geometry"" - which is the name of the GEOMETRY column inside the source FileGDB. {{{ ogrinfo -ro -so pg:""host=${host} dbname=${db} port=${port}"" bcgov.dra_mpar_sp :( =98% INFO: Open of `pg:host=${host} dbname=${db} port=${port}' using driver `PostgreSQL' successful. Layer name: bcgov.dra_mpar_sp Geometry: Multi Line String Feature Count: 1723766 Extent: (336279.147717, 364282.200602) - (1874557.681717, 1717288.836602) Layer SRS WKT: PROJCS[""NAD83 / BC Albers"", GEOGCS[""NAD83"", DATUM[""North_American_Datum_1983"", SPHEROID[""GRS 1980"",6378137,298.257222101, AUTHORITY[""EPSG"",""7019""]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY[""EPSG"",""6269""]], PRIMEM[""Greenwich"",0, AUTHORITY[""EPSG"",""8901""]], UNIT[""degree"",0.0174532925199433, AUTHORITY[""EPSG"",""9122""]], AUTHORITY[""EPSG"",""4269""]], UNIT[""metre"",1, AUTHORITY[""EPSG"",""9001""]], PROJECTION[""Albers_Conic_Equal_Area""], PARAMETER[""standard_parallel_1"",50], PARAMETER[""standard_parallel_2"",58.5], PARAMETER[""latitude_of_center"",45], PARAMETER[""longitude_of_center"",-126], PARAMETER[""false_easting"",1000000], PARAMETER[""false_northing"",0], AUTHORITY[""EPSG"",""3005""], AXIS[""Easting"",EAST], AXIS[""Northing"",NORTH]] FID Column = ogc_fid Geometry Column NOT NULL = geometry ... }}} So it looks like it could be using the geometry column name from the input data source because it's not falling back to the wkb_geometry default. My data source is a 261 MB FileGDB from ftp://ftp.geobc.gov.bc.ca/sections/outgoing/bmgs/DRA_Public/dgtl_road_atlas.gdb.zip " defect closed normal 2.0.3 OGR_SF 2.0.0 normal fixed pg