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 advice?
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 PostGIS 2.0, and also in postgis 1.5 is st_force_2d(geometry)