[gdal-dev] ogr pgdump commits
Andrew Terry
andrew.terry at centremaps.co.uk
Mon Dec 19 02:48:10 PST 2022
Hi,
Successfully writing data to postgres using ogr2ogr with pg_dump to push data through psql in the style:
ogr2ogr --config PG_USE_COPY YES -f PGDump /vsistdout/ abc.shp | psql -d my_dbname -f -
I'm finding some warnings in my logs and pushing the output to a file I can see it creates SQL like:
SET standard_conforming_strings = OFF;
BEGIN;
COPY ....
\.
END;
COMMIT;
BEGIN;
COPY ....
As a result, I'm getting the following which I understand to be due to psql already applying it's own begin / commit:
BEGIN
COPY 72
COMMIT
WARNING: there is no transaction in progress
COMMIT
Purely for the purposes of allowing me to avoid these WARNING messages in error logging, I wondered whether there's any way to avoid this.
Thanks!
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221219/d49ba1a3/attachment-0001.htm>
More information about the gdal-dev
mailing list