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 am trying to connect to a remote postgis 2.0 server (Ubuntu) from QGIS 2.0.1 (installed on winxp). I have been working with QGIS 1.7 / 1.8 on the same database for almost a year without any issue.
But I recently installed QGIS 2.0 and although everything seems to work fine, when I load a layer it has no rows at all, and when I try to exit QGIS it crashes. It raises a warning saying that:

cursor 1 is lost

Could anybody give me some advise?


Thank you for your answers. The log displays something like 20 PostGIS error messages, like this:
-------------------------
SQL: DECLARE qgisf0_11 BINARY CURSOR FOR SELECT st_asbinary(ST_Force2D("the_geom"),'NDR'),"id_column"FROM"schema"."table"WHERE"the_geom"&&st_makeenvelope(41.5457,35.544,36.784254,44.15748)
Resultado:7(ERROR: function st_force2d(geometry) does not exist
LINE1: ...RE qgis0_11 BINARY CURSOR FOR SELECT st_asbinary(ST_Force2D...

HINT: No function matches the given name and argument types. You might need to add explicit type casts.
---------------------------------

The actual name of the function in PostGIS2.0, and also in postgis 1.5 is st_force_2d(geometry)

share|improve this question
    
Is that the exact error message? –  Simbamangu Nov 30 '13 at 4:58
    
Is there also some error messages in the PostgreSQL logs? Those can be helpful. –  SaultDon Nov 30 '13 at 22:28
add comment

1 Answer

up vote 0 down vote accepted

This has been solved in this commit.

Please try a development snapshot (nightly/master/qgis-dev from OSGeo4W) where this should be solved. It is possible, that a bugfix release (2.0.2) will solve this issue and (almost) certain that the next release 2.2 will contain this fix.

share|improve this answer
    
Thank you, I think I am going to wait for the bugfix release, and continue working with 1.8 meanwhile –  carlos Dec 2 '13 at 12:30
    
Version 2.2 definitely solves the problem. Thank you! –  carlos Mar 4 at 13:34
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.