Re: Newbie struggling to set $PGDATA - Mailing list pgsql-general

From Nils Zonneveld
Subject Re: Newbie struggling to set $PGDATA
Date
Msg-id 3AE6FED1.3CB896AE@mbit.nl
Whole thread Raw
In response to Newbie struggling to set $PGDATA  (Geoff Caplan <geoff@productivity.co.uk>)
List 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.
>
> Geoff Caplan
>

Look in your /etc/profile file if /etc/profile.local is called if so you
can add to profile.local or otherwise create a new profile.local with
the following lines:

PATH=$PATH:/usr/local/pgsql/bin
export PATH
MANPATH=$MANPATH:/usr/local/pgsql/man
export MANPATH
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH
PGLIB=/usr/local/pgsql/lib
export PGLIB
PGDATA=/var/lib/pgsql
export PGDATA

(depending on your own path settings of course)

If /etc/profile.local is not used, add the lines to /etc/profile.

HTH,

Nils Zonneveld

pgsql-general by date:

Previous
From: Rob Yampolsky
Date:
Subject: Re: How to configure iodbc access to local postgres db?
Next
From: Harry Yau
Date:
Subject: function return multiple value