[Qgis-developer] Problem with Postgis 2.0 Views and picking (info-tool)

Andreas Neumann a.neumann at carto.net
Wed Jan 18 13:34:13 EST 2012

Meanwhile I tested with the same data on Postgis 1.5.3. Everything works
fine with Postgis 1.5.3

So apparently there are issues with Postgis 2.0. I followed Denis'
advice and deliberately set the SRID of the_geom in my view to "-1" with
SetSRID(the_geom,-1), voila, it works!

To me this sounds like a bug. QGIS somehow intersects (for picking and
selecting) an SRID of -1 with the layers SRID (in my case 21781) and
results in a mixed SRID error.

Jürgen or Strk - can you help with this issue?


On 01/18/2012 12:07 AM, Andreas Neumann wrote:
> Hi,
> I recently experimented again with Postgis 2.0 again. I noticed while
> loading the Views works fine, that I cannot pick an object with the info
> tools.
> It works fine with regular tables, but fails for views.
> Here is the error message I get in the log:
> -----------------------
> Fetching from cursor qgisf0 failed
> Database error: ERROR:  Operation on mixed SRID geometries
> Query: CLOSE qgisf0 returned 7 [ERROR:  current transaction is aborted,
> commands ignored until end of transaction block
> ]
> 1 cursor states lost.
> SQL: CLOSE qgisf0
> Result: 7 (ERROR:  current transaction is aborted, commands ignored
> until end of transaction block
> )
> -----------------
> The error message about the mixed geometries is strange, since the view
> and the project have the same SRID.
> Any idea what could be wrong here? Currently I only have a Postgis 2.0
> database available, so I can't test with Postgis 1.5 at the same time.
> Maybe with a virtual machine ...
> Andreas
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

More information about the Qgis-developer mailing list