PostgreSQL
 sql >> Datenbank >  >> RDS >> PostgreSQL

So importieren Sie eine ZIP-Datei in die Postgres-Tabelle

Innerhalb von Postgres:

COPY table_name FROM PROGRAM 'unzip -p input.csv.zip' DELIMITER ',';

Aus der Manpage für unzip -p :

-p     extract files to pipe (stdout).  Nothing but the file data is sent to stdout, and the files are always extracted  in  binary
       format, just as they are stored (no conversions).