Re: Combine psql command with shell script

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Combine psql command with shell script
Дата
Msg-id 20090311122024.GB4009@alvh.no-ip.org
обсуждение исходный текст
Ответ на 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 tables and want to user
> the "\copy" command to import data from 10 different text files. I can
> execute the "\copy" command 10 times. But it is not convenient.

If the 10 files go into different 10 tables, you have no option but to
call \copy 10 times anyway.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: upgrade from 7.4 to 8.3
Следующее
От: Marc Cuypers
Дата:
Сообщение: Re: SOLVED upgrade from 7.4 to 8.3