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.

I have a localhost PostGIS database that I would like to use with SEXTANTE in QGIS. I can connect to the database just fine using "Add PostGIS layers...", but when I try "PostGIS execute SQL" in SEXTANTE, I´m not sure of what to enter and I can´t find any documentation or examples. All I get is "Wrong database connection name...". Any suggestions/examples on how to connect to the database?

Magnus

share|improve this question
    
Please mark the question as resolved if you think that my answer is correct. –  Francisco Puga Mar 4 '13 at 9:58

1 Answer 1

up vote 1 down vote accepted

I think that you should use the name that you give to one of your defined postgis connections.

Open Add Vector Layer Dialog -> Database -> Check the available connections on the Connections combobox and use this exact name as database on the "Postgis execute SQL" option

*Postgis execute SQL" launchs your query to the database. No more, no less. It does not have a rich gui, and it does not produce any output.

Probably if you want to create and launch sql queries within qgis there are two plugins that provides better functionality:

share|improve this answer
    
Ah, so I should enter the connection name from the QGIS standard PostGIS connection, and not the real database name. This should be clarified somewhere in the documentation. When I use this name and enter for example SELECT name FROM data.nyc_neighborhoods; I no longer get the error message. In fact, I get nothing at all. When I hit "OK", the window simply disapears. I expected some kind of output, since the same query produces results in pgAdmin. Perhaps I have misunderstood how to use SEXTANTE. –  johnrobot Mar 2 '13 at 10:56
    
I edit my answer trying to re-answer your comment –  Francisco Puga Mar 2 '13 at 15:09

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.