psql copy from through bash

Поиск
Список
Период
Сортировка
От Kirk Wythers
Тема psql copy from through bash
Дата
Msg-id 044EFA84-2036-49F5-8ACE-7B75F112011B@umn.edu
обсуждение исходный текст
Ответы Re: psql copy from through bash  (Szymon Guz <mabewlun@gmail.com>)
Re: psql copy from through bash  (Jerry Sievers <gsievers19@comcast.net>)
Список pgsql-general
Can anyone see what I'm misisng? I am trying to run a psql "copy from" command through a bash script to load a buch of
cdvfiles into the same table. I'm getting an error about the file "infile" not existing? 

#!/bin/sh

for infile in /path_to_files/*.csv
do
   cat infile | psql dbname -c "\copy table_name FROM stdin with delimiter as ',' NULL AS 'NA' CSV HEADER"
done


Thanks in advance

В списке pgsql-general по дате отправления:

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: [postgis-users] Query with LIMIT but as random result set?
Следующее
От: Szymon Guz
Дата:
Сообщение: Re: psql copy from through bash