I'm new to PostGIS/QGIS, and I was looking at using the PostGIS SQL Editor plugin (v.2.0.0) instead of the OpenJump tool recommended in PostGIS in Action 2nd ed. However, I am having problems following the plugin help advice stating that 'The Path to pgsql2shp must be added to the system PATH environment'.

I already have the relevant PostgreSQL paths (;C:\Program Files\PostgreSQL\9.6\bin;C:\PostgreSQL\9.6\lib) added to my system variables (psql works fine from the command line), but I am still getting the error ''pgsql2shp' is not recognized as an internal or external command, operable program or batch file.' from the QGIS plugin.

I'm using QGIS 2.18.4, PostgreSQL 9.6, PostGIS 2.3.2 on Windows 7 Enterprise.

| improve this question | | | | |
  • Where is the pgsql2shp.exe located? The folder should be added to the path. – Techie_Gus Jun 18 '17 at 17:08
  • 1
    Have you tried DbManager? That is a plugin already installed by QGIS and lets you do adhoc queries and load them on map canvas as a layer, without having to dump to pgsql2shp. It also has import, export, and edit capabilities as well. – LR1234567 Jun 18 '17 at 17:45
  • @Techie_Gus pgsql2shp.exe is within C:\Program Files\PostgreSQL\9.6\bin, hence my confusion (it is already added to my path). – sacrevert Jun 18 '17 at 18:46
  • 1
    @LR1234567 Thanks for the tip, I did not realise that that tool already offered ad hoc queries and map canvas layer visualisation. – sacrevert Jun 18 '17 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.