Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

It seems pretty clear I cannot connect to a local postgresql installation out of QGIS. This is my first experience with PostGIS. I am using PostgreSQL 9.0 on a win7 machine. I can see the successful installation of Postgresql and the postgis database in both PGAdmin and NaviCat. I have added a user account in PGAdmin which is not a superuser (meaning I believe I have dealt with the issues discussed at http://pgsnake.blogspot.com/2010/07/postgresql-passwords-and-installers.html).

Has something changed on QGIS 1.7?

After I choose to Add Postgis Layer, I specify a new connection which resembles my configuration and is consistent with http://www.gistutor.com/quantum-gis/20-intermediate-quantum-gis-tutorials/34-working-with-your-postgis-layers-using-quantum-gis-qgis.html and the Linfinity blog. I have toggled SSL mode after reading http://osgeo-org.1803224.n2.nabble.com/Postgis-SSL-connection-td2037146.html.

The failure in the test connection leads to "ERROR:service file "/etc/pg_service.conf" not found".

Has anyone got some more positive experience with PostgreSQL, QGIS and Win7?

share|improve this question
    
darn! i had the same issue. –  George Feb 13 '12 at 18:20
add comment

1 Answer

up vote 10 down vote accepted

The service parameter in the QGIS/PostGIS dialog should be empty. And I spent a bit of time killing the user account "postgres" in windows and removing the names of the databases which are created in the windows registry. After that I could repeatedly fail the dialog by having something in the service parameter of the QGIS Postgis connection dialog.

share|improve this answer
    
Please accept your own answer if it solved the problem. –  underdark Jul 10 '11 at 12:07
1  
GIS SE wants me to wait a few hours till I can do this... –  BWill Jul 11 '11 at 11:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.