pramsey / pgsql-ogr-fdw

PostgreSQL foreign data wrapper for OGR
MIT License
237 stars 34 forks source link

Use ogr_fdw to write new files from PostgreSQL tables ? #139

Closed mdouchin closed 6 years ago

mdouchin commented 6 years ago

Hi,

I wonder if it is possible to use ogr_fdw with the updatable option to write (or overwrite) any file on disk ( / tmp/ for example). The idea is to export data from PostgreSQL into Shapefile or any other format, without the need to pre-create the empty Shapefile beforehand.

Any hint on this ? Thanks a lot for your work for ogr_fdw

pramsey commented 6 years ago

Nope, FDW has no allowance for creating remote tables. Use ogr2ogr or pgsql2shp, you'll be happier in the long run.

mdouchin commented 6 years ago

thanks for your answer. Indeed, it was a bit cumbersome, but for some users, it makes sense to "stay inside" PostgreSQL. I personnaly used ogr2ogr for years with much love ;)