[gdal-dev] ogr2ogr 2.0 PG driver problem
even.rouault at spatialys.com
Wed Jul 15 05:49:04 PDT 2015
On Wednesday 15 July 2015 11:42:50 michele_zanolli at comune.trento.it wrote:
> Hi all,
> I recently installed GDAL 2.0 and this is my issue:
> if I take a simple shp (or csv file) and then
> ogr2ogr -f PostgreSQL "PG:host=localhost user=myuser schemas=myschema"
> mylayer -nln mylayer
> The layer is successfully imported in the DB and in the right schema, but I
> ERROR 1: PQconnectdb failed: invalid connection option "schemas"
> ERROR 1: Couldn't establish a database connection
> If i use the -overwrite option, no errors are printed.
I can replicate the issue. I had a quick look and the cause was not obvious.
Could you please file a ticket in Trac about that for further investigation ?
Actually I see it works if you add -update, so as to update the PG connection
in update mode, rather than in "creation" mode. The creation mode has always
been kind of a hack since technically OGR does not create a database, but just
connects to an existing one. But I can't figure out a strong reason for which
the syntax you use wouldn't work anymore.
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Spatialys - Geospatial professional services
More information about the gdal-dev