Jorge,

I'm a bit hesitant to think using a server cursor would be the best approach
here. Could you explain why is this needed?
I my understanding each IReadBlock would trigger a normal "SELECT" without
the cursor, this will give you all the data at once, just like FETCH ALL.
This select would in fact be a spatial select according to the extent of the
block required by the client.

Best regards,

Tamas




2009/7/10 Jorge Arévalo <[email protected]>

> Hello,
>
> Context: GDAL WKTRaster Driver. When creating Dataset, I declare a
> cursor to read all the rows (tiles) of a table with a raster column
> (DECLARE cursor CURSOR FOR SELECT * FROM TABLE). The RasterBand should
> read one of the rows' band
>
> Question 1: The cursor is created during the Dataset creation, and
> stored in it. Should I start a transaction before? If yes, when should
> I close the cursor and end the transaction? When calling to Dataset's
> destructor?
> Question 2: What approach is better?
>     a) The Dataset fetchs all the rows (tiles) of the table just
> after declaring the cursor, and the RasterBand moves over the
> resultset using PQgetvalue and read one band of the read raster
>     b) The Dataset declare the cursor and the RasterBand fetchs the
> row that needs to read one of its bands
>
> Thanks in advance.
>
> Best regards
> Jorge
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to