Обсуждение: batch file

Поиск
Список
Период
Сортировка

batch file

От
Hugo Coolens
Дата:
In the postgresql tutorial it is explained how to enter commands one by
one, I was wondering whether it is possible to first put a series of
commands in an ascii file and then read in that file with psql. Here are
my questions:
1. What should be the default extension of such a file
2. Which command in psql should I use to read in suc a file

best regards,
hugo


Re: batch file

От
Bruce Momjian
Дата:
Hugo Coolens wrote:
> In the postgresql tutorial it is explained how to enter commands one by
> one, I was wondering whether it is possible to first put a series of
> commands in an ascii file and then read in that file with psql. Here are
> my questions:
> 1. What should be the default extension of such a file

Any.

> 2. Which command in psql should I use to read in suc a file

psql -f filename.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026