Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing > Import Vector into PostGIS database > error #22614

Closed
qgib opened this issue Apr 9, 2016 · 2 comments
Closed

Processing > Import Vector into PostGIS database > error #22614

qgib opened this issue Apr 9, 2016 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@qgib
Copy link
Contributor

qgib commented Apr 9, 2016

Author Name: Paolo Cavallini (@pcav)
Original Redmine Issue: 14650
Affected QGIS version: 2.14.1
Redmine category:processing/ogr


See the attached file; others run smoothly.

Apparently the command attempts to write into spatial_ref_sys, where normally the user has only SELECT:

Algorithm Import Vector into PostGIS database (available connections) starting...
GDAL command:
ogr2ogr -progress --config PG_USE_COPY YES -f PostgreSQL PG:"host=localhost port=5432 dbname=corso password=utente active_schema=public user=utente" -lco DIM=2 /tmp/processing45330ad6bfb042f8a9bfb8be779e9668/e6179800548f427bb402f5eb1e8f62e1/OUTPUTLAYER.shp OUTPUTLAYER -overwrite -nlt MULTIPOLYGON -lco GEOMETRY_NAME=geom -lco FID=id -spat 1554733.17969 4678313.90625 1771614.78906 4924775.96094 -nlt PROMOTE_TO_MULTI
GDAL command output:
Progress turned off as fast feature count is not available.
ERROR 1: ERRORE: permission denied for relation spatial_ref_sys

ERROR 1: ERRORE: la transazione corrente è interrotta, i comandi saranno ignorati fino alla fine del blocco della transazione

ERROR 1: CREATE TABLE "public"."outputlayer" ( "id" SERIAL, PRIMARY KEY ("id"), "name" VARCHAR(40), "provincia" VARCHAR(80), "pop1951" NUMERIC(24,15), "pop1991" NUMERIC(24,15), "d_min" NUMERIC(22,6), "d_max" NUMERIC(22,6), "d_sum" NUMERIC(22,6), "d_count" NUMERIC(22,6), "d_mean" NUMERIC(22,6), "d_std" NUMERIC(22,6), "d_unique" NUMERIC(22,6), "d_range" NUMERIC(22,6), "d_var" NUMERIC(22,6), "d_median" NUMERIC(22,6), "d_mode" NUMERIC(22,6), "geom" geometry(MULTIPOLYGON,900914) )
ERRORE: la transazione corrente è interrotta, i comandi saranno ignorati fino alla fine del blocco della transazione

ERROR 1: Unable to write feature 0 from layer OUTPUTLAYER.

ERROR 1: Terminating translation prematurely after failed
translation of layer OUTPUTLAYER (use -skipfailures to skip errors)


@qgib
Copy link
Contributor Author

qgib commented Apr 9, 2016

Author Name: Giovanni Manghi (@gioman)


No problems whatsoever here with your data (Lin and Win) using a connection with a user that has only "select" on spatial_ref_sys.

Tested also your command from the cli, no issues. As the tool is just a frontend for ogr2ogr you must also try. If it fails and the command is correct (and the above one it is) then the problem is likely somewhere else.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Apr 10, 2016

Author Name: Paolo Cavallini (@pcav)


Right, an upstream issue. Sorry for the noise.


  • resolution was changed from to up/downstream
  • status_id was changed from Feedback to Rejected

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant