wavded / ogr2ogr

An ogr2ogr wrapper library
MIT License
214 stars 46 forks source link

ERROR: column s.consrc does not exist #106

Closed gautam-kirtania closed 2 weeks ago

gautam-kirtania commented 2 weeks ago

Thanks in advance.

I'm using ogr2ogr to move data from a shapefile to a postgres table.

This is the command I'm using. ogr2ogr -f PostgreSQL "PG:dbname=<dbname> user=<dbuser> password=<dbpassword> host=<dbhost>" -nln tmp_sample -nlt PROMOTE_TO_MULTI sample.shp -select -skipfailures

This is the error I'm getting

LINE 1: ...nrelid = c.oid AND a.attnum = ANY (s.conkey) AND (s.consrc L...
                                                             ^
HINT:  Perhaps you meant to reference the column "s.conkey" or the column "s.conbin".

ERROR 1: ERROR:  column s.consrc does not exist
LINE 1: ...nrelid = c.oid AND a.attnum = ANY (s.conkey) AND (s.consrc L...
                                                             ^
HINT:  Perhaps you meant to reference the column "s.conkey" or the column "s.conbin".

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

My system config looks like this:

OS - ubuntu:18.04 Python - 3.8 GDAL - 2.4.2 Postgres - 16

wavded commented 2 weeks ago

Hi! I would recommend reaching out in the gdal or gis stackexchange for this type of question as it it deals with the ogr2ogr tool directly. This is just for the Node wrapper.