Re: Combine psql command with shell script

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Combine psql command with shell script
Дата
Msg-id 49B75EBC.4010309@hogranch.com
обсуждение исходный текст
Ответ на Combine psql command with shell script  (John Wang <johnw822003@yahoo.com>)
Список pgsql-general
John Wang wrote:
> How to combine psql commands, such as "\copy", with shell script? Is there any sample code? For example, I have 10
tablesand want to user the "\copy" command to import data from 10 different text files. I can execute the "\copy"
command10 times. But it is not convenient. 
>


$ psql .... -f filename.sql

where filename.sql contains whatever stack of commands you wanna run.

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

Предыдущее
От: John Wang
Дата:
Сообщение: Combine psql command with shell script
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Combine psql command with shell script