[gdal-dev] PG driver: apply custom sql files together with loading data in one transaction

Even Rouault even.rouault at spatialys.com
Fri Aug 31 01:31:46 PDT 2018


On vendredi 31 août 2018 10:20:49 CEST Martin Landa wrote:
> Hi,
> 
> čt 30. 8. 2018 v 16:28 odesílatel Even Rouault
> 
> <even.rouault at spatialys.com> napsal:
> > API by yourself to do ogr2ogr-like ingestion, and then ExecuteSQL() for
> > your customizations.
> 
> great, first tests with ExecuteSQL(fd.read()) went well. Unfortunately
> the method returns always None regardless of success or failure.

Yes it will return either None either a result set layer if the command is 
typically a SELECT or something that returns rows.

> Is
> there any way how to catch up errors when executing SQL commands by
> ExecuteSQL()?

testing CPLGetLastErrorType() != CE_None

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list