I am trying to figure out how to use this GDAL driver to create a SQL dump, using the ogr2ogr commandline. I have tried the following:
ogr2ogr -oo AUTOCORRECT_INVALID_DATA=YES --config PG_USE_COPY=YES -f PGDump /vsizip/BAGNLDL-08122020/9999STA08122020.zip
This runs without errors. However, it creates a folder called 'PGDump' containing shapefiles, whereas I expected it to create a single SQL file. Upon adding the extra argument 'test.sql' (after the example of this driver) I get:
ogr2ogr -oo AUTOCORRECT_INVALID_DATA=YES --config PG_USE_COPY=YES -f PGDump test.sql /vsizip/BAGNLDL-08122020/9999STA08122020.zip
But then I receive the following error:
FAILURE: Unable to open datasource `test.sql' with the following drivers.
I've found different usage of quotation marks online, but adjusting them (e.g. "PGDump" instead of PGDump) does not change any of the results above. I'm running GDAL version 3.2.1.
Is there anything wrong with the syntax, or am I just misunderstanding how to use ogr2ogr?