psql_csv/push_all.sh
2020-05-01 16:02:49 -04:00

10 lines
207 B
Bash

#!/bin/bash
getlist() {
find . -iname "*.csv" | while read f
do
$PG -c "\copy import.targ_rev FROM $f WITH CSV HEADER DELIMITER ',';"
done
}
$PG -c "DELETE FROM import.targ_rev;"
getlist