Re: Accessing environment variables from psql (SOLVED)

Поиск
Список
Период
Сортировка
От Leif B. Kristensen
Тема Re: Accessing environment variables from psql (SOLVED)
Дата
Msg-id 200504102228.54001.leif@solumslekt.org
обсуждение исходный текст
Ответ на Re: Accessing environment variables from psql (SOLVED)  (Andreas Seltenreich <seltenreich@gmx.de>)
Список pgsql-general
On Sunday 10 April 2005 03:39, Andreas Seltenreich wrote:

> You can concatenate values using \set. So using
>
>     \set importfile :importdir /test.sql
>     \i :importfile
>
> you won't have to mess with $PWD.

Thanks for the tip, Andreas. But I have about a dozen sql files in the
import directory, one for each table. So it's actually easier to do a
cd there and run the import, than to concatenate the pathname to every
single file name.

However, running an install script from within psql may be the wrong
approach. I might as well define and populate the database from a shell
script.
--
Leif Biberg Kristensen
http://solumslekt.org/

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg 8.0.1-r3 killls pgadmin3 and phppgadmin
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: PostgreSQL 8.0.2 Now Available