[gdal-dev] ogr2ogr 2.0 PG driver problem

Martin Landa landa.martin at gmail.com
Wed Jul 15 04:04:52 PDT 2015

Ciao Michele,

2015-07-15 11:42 GMT+02:00  <michele_zanolli at comune.trento.it>:
> 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 read:
> ERROR 1: PQconnectdb failed: invalid connection option "schemas"
> ERROR 1: Couldn't establish a database connection

try -lco 'schema=myschema' option, so

ogr2ogr -f PostgreSQL "PG:host=localhost user=myuser" mylayer -nln
mylayer -lco 'schema=myschema'


PS: In connection string is also missing `dbname`.

Martin Landa

More information about the gdal-dev mailing list