I'm using the Fishnet function as described here to create a grid.
If I use the following SQL to call the function to position a grid where I want it (I'm using NZGD2000 SRID = 2193) the query returns from postgresql as expected:
create sequence temp; select nextval('temp')::int as id, st_setsrid(geom,2193) from st_createfishnet(100,100,1000,1000,1645375,5349447);
If I try to create a layer in qgis using the select portion of the above SQL statement (i.e. not the create sequence command), using either 'Fast SQL Layer' or 'RT SQL Layer' plugins, the query returns zero results.
If I execute the following SQL statement in postgresql to create the temporary table and then add a PostGIS layer to qgis, the grid shows fine with all records returned as expected.
select nextval('temp')::int as id, st_setsrid(geom,2193) as geom into temptable from st_createfishnet(100,100,1000,1000,1645375,5349447);
I've used both of these plugins before for doing on-the-fly calculations in postgis and displaying in qgis - usefully eliminating the need for temporary tables. Is there a bug in them that is being triggered by this specific query? Or am I doing something wrong that I just can't see?
Using Quantum GIS 1.8.0 ; Postgresql 9.1 ; PostGIS 2.0
EDIT: clarified that I'm only running one statement in the plugin, without the create sequence command