Home > front end >  Load files from FTP in File_FDW in Postgresql
Load files from FTP in File_FDW in Postgresql

Time:09-16

Can you help me understand if file_fdw allows to connect and read from FTP ? How can that be done?

CodePudding user response:

No, file_fdw can only access files local on the database server machine.

Perhaps COPY ... FROM PROGRAM is what you need:

COPY tab
FROM PROGRAM 'curl ftp://server.org/file';

But this copies the data into a database table.

CodePudding user response:

file_fdw, starting in version 10, supports PROGRAM. So if you can write a program (or use existing programs) to read from ftp, you can hook file_fdw up to it.

  • Related