Re: Accessing environment variables from psql (SOLVED) - Mailing list pgsql-general

From Leif B. Kristensen
Subject Re: Accessing environment variables from psql (SOLVED)
Date
Msg-id 200504102228.54001.leif@solumslekt.org
Whole thread Raw
In response to Re: Accessing environment variables from psql (SOLVED)  (Andreas Seltenreich <seltenreich@gmx.de>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg 8.0.1-r3 killls pgadmin3 and phppgadmin
Next
From: "Marc G. Fournier"
Date:
Subject: PostgreSQL 8.0.2 Now Available