From: | Luca Ferrari <fluca1978(at)infinito(dot)it> |
---|---|
To: | "carlosinfl (dot)" <carlos(dot)mennens(at)gmail(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Postgres User Home ENV Help |
Date: | 2013-07-04 08:51:34 |
Message-ID: | CAKoxK+5uLjUqDc8W4R8Gj5AJ0jLQNj=d6_tM-8XX82sGfY_VMQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Thu, Jun 20, 2013 at 11:13 PM, carlosinfl . <carlos(dot)mennens(at)gmail(dot)com> wrote:
> Can someone please help me set the 'postgres' users home ENV so that I
> can simply type 'psql' rather than the rull path and bash doesn't say
> '-bash-4.1$'?
>
> -bash-4.1$ whoami;ls -l;pwd
> postgres
>
> total 12
> drwx------ 2 postgres postgres 4096 Apr 4 18:33 backups
> drwx------ 15 postgres postgres 4096 Jun 18 20:52 data
> -rw------- 1 postgres postgres 1493 Jun 14 21:11 pgstartup.log
>
> /var/lib/pgsql9
>
First you have to find out where 'psql' executable is, and from the
path I guess it is a linux distro with a packaged postgresql version.
Usually psql lies in /usr/local/bin or /usr/bin, so setting the PATH
variable to include such directory should work.
First of all check what the PATH varaible is:
echo $PATH
and then find out where psql is and add the directory to PATH:
PATH=$PATH:<new-dir>
and make it permanent.
However, as already suggested, you should not use the "postgres" user,
but you can do the above steps also for a normal account.
Hope this helps.
Luca
From | Date | Subject | |
---|---|---|---|
Next Message | Johannes Staffans | 2013-07-09 09:22:02 | hstore for handling large amounts of events? |
Previous Message | Luca Ferrari | 2013-07-04 08:18:12 | Re: Is it possible to start PostgreSQL in 'restrict' mode |