Re: Loading a list of SQL scripts with relative paths - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: Loading a list of SQL scripts with relative paths
Date
Msg-id 37fd05cfb2d5812df3a432f7edecbe36@myrealbox.com
Whole thread Raw
In response to Re: Loading a list of SQL scripts with relative paths  ("Leif B. Kristensen" <leif@solumslekt.org>)
List pgsql-general
On May 11, 2005, at 3:58, Leif B. Kristensen wrote:

> On Tuesday 10 May 2005 17:24, Michael Glaesemann wrote:
>> This works well, but I think I'll have to change all of the paths
>> when I move the group of scripts to the production server to load
>> them. What I'd like to do is be able to use paths relative to the
>> file that contains the \i commands. This doesn't seem to work when
>> using \i.
>>
>> I imagine that I'm not alone in wanting to load a bunch of scripts at
>> a go, and I'm wondering how others handle this situation. Advice?
>> Suggestions? What works for you?
>
> I had a similar problem, which I solved by using environment variables:

<snip />

> Here's the whole thread:
> <http://www.mail-archive.com/pgsql-general@postgresql.org/
> msg60216.html>
> --

Thanks, Leif, for the great summary of your technique! I'll definitely
give it a go.

Michael Glaesemann
grzm myrealbox com


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
Next
From: Peter Fein
Date:
Subject: JOIN on set of rows?