Skip to main content
Question

Can I create PGDump file like ogr2ogr


travisk

I have a remote postgres / postgis db that I'd like to import data using .sql file resulting from an FME translation. Something like ogr's PGDump format using the COPY method

Kindest regards...

2 replies

giosp
Contributor
Forum|alt.badge.img+6
  • Contributor
  • April 7, 2020

Hi @travisk,

why you don't write direct to postgres with the postgres or postgis writer in fmedesktop?

So, for our infrastructure, I've implemented some SystemCallers that call pg_dump and pg_restore. I think you can create your "custom SystemCallers" that call ogr2ogr script or commands.

 

Bye, regards


travisk
  • Author
  • April 8, 2020
giosp wrote:

Hi @travisk,

why you don't write direct to postgres with the postgres or postgis writer in fmedesktop?

So, for our infrastructure, I've implemented some SystemCallers that call pg_dump and pg_restore. I think you can create your "custom SystemCallers" that call ogr2ogr script or commands.

 

Bye, regards

The database is remote and I have no direct connectivity from my workbench. My typical workflow is to use ogr2ogr to create a intermediate sql file and sneaker copy it to my db server then run pgsql dbname < myimport.sql to insert / update my tables. I could write a a simple text file that creates a table and performs a bunch of inserts or a bulk copy similar to ogr2ogr but I was hoping for a out of the box solution that could handle managing the feature type definition.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings