[gdal-dev] Create PostGIS database using OGR/GDAL

Even Rouault even.rouault at spatialys.com
Fri Oct 24 01:19:22 PDT 2014


Le vendredi 24 octobre 2014 09:45:03, Paul Meems a écrit :
> Thanks for your reply.
> 
> MapWinGIS is indeed a Windows-only project written in C++.
> My test application is written in C#, so I can use npsql to connect to
> PostGIS and send the 'Create database' statement.
> 
> But I'm mostly wondering why I can do everything with the PostGIS driver,
> except create or drop a database.
> Perhaps the driver needs a ExecuteNonQuery() function, like npsql does?

Paul,

Up to know ExecuteSQL() ran passed SQL inside a transaction except when it was 
a VACUUM that requires NOT to be run inside any transaction. Apparently CREATE 
DATABASE too. I've reverted the logic (in trunk): now  passed SQL is always 
run outside of transaction except in the case of SELECT ... FROM .... where we 
actually create a cursor to scroll the results, which require a transaction.
So now I can run CREATE DATABASE

Even

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


More information about the gdal-dev mailing list