Re: Newbie struggling to set $PGDATA

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Geoff Caplan <geoff(at)productivity(dot)co(dot)uk>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Newbie struggling to set $PGDATA
Date: 2001-04-25 22:19:08
Message-ID: 200104252219.f3PMJRU30855@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Geoff Caplan wrote:

>Please help out a Linx/Postgres newbie.
>
>I simply want to set the $PGDATA environmental variable, but can't
>figure out how. The docs assume you already know...
>
>I have tried setting it in my bash /etc/profile configuration file,
>and it shows up ok if I "echo $PGDATA" in the shell. But none of the
>postgres utilities such as "initdb" seem to be able to find it.
>
>What don't I understand? I have already checked the docs/GreatBridge
>manual/faqs/archive, so I would very much appreciate some help.

Maybe you need to export it. Unless you export a variable, it remains
local to the shell where you define it.

PGDATA=/path/to/data
export PGDATA

or

export PGDATA=/path/to/data

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Nay, in all these things we are more than conquerors
through him that loved us." Romans 8:37

Browse pgsql-general by date

  From Date Subject
Next Message Dr. Evil 2001-04-25 22:45:38 CREATE TABLE AS... syntax?
Previous Message Dale Walker 2001-04-25 22:13:04 Re: playing with timestamp entries