[gdal-dev] transactions and ExecuteSQL

Martin Landa landa.martin at gmail.com
Fri Aug 19 08:10:02 EDT 2011


how to deal with transactions when calling ExecuteSQL()? Example for
PostGIS layer

    poDS = OGRSFDriverRegistrar::Open("PG:dbname=pgis_nc", FALSE);

    poLayer = poDS->GetLayerByName("b_1");

    poDS->ExecuteSQL("update b_1 set objectid = 5 where cat = 4", NULL, NULL);


Calling StartTransaction() and CommitTransaction() has no effect since
ExecuteSQL() calls FlushSoftTransaction(). How to deal with that?

Thanks in advance, Martin

Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

More information about the gdal-dev mailing list