Re: Accessing environment variables from psql (SOLVED)

From: "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Accessing environment variables from psql (SOLVED)
Date: 2005-04-10 20:28:53
Message-ID: 200504102228.54001.leif@solumslekt.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2005-04-10 22:48:00 PostgreSQL 8.0.2 Now Available
Previous Message John DeSoi 2005-04-10 19:37:17 Re: grant all privileges to all tables in a database