pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
psql command
4+ messages / 3 participants
[nested] [flat]

* psql command
@ 2006-09-07 05:56  Iuri Sampaio <iuri.sampaio@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Iuri Sampaio @ 2006-09-07 05:56 UTC (permalink / raw)
  To: pgsql-admin

The postgres commands work fine to postgres user but it doesn't work to a
random user account

 

I already created the user on postgres

desktop:~# su - postgres

postgres@desktop:~$ createuser -a -d oacsbr

 

and set on .bashrc 

LD_LIBRARY_PATH=:/usr/local/pgsql/lib:/usr/local/pgsql/lib

PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/pgsql/b
in:/usr/local/pgsql/bin

 

 

But somehow I can't run any commands such as 

oacsbr@desktop:~$ createdb -E UNICODE mytestdb

-su: createdb: command not found

oacsbr@desktop:~$ psql -l

-su: psql: command not found

oacsbr@desktop:~$ psql -l mytestdb.dmp mytestdb

-su: psql: command not found

 

 

Does anyone knows what I've missed?

 

iuri

 

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: psql command
@ 2006-09-07 06:00  Iuri Sampaio <iuri.sampaio@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Iuri Sampaio @ 2006-09-07 06:00 UTC (permalink / raw)
  To: pgsql-admin

I forgot to contextualize,

 

env | grep PATH :

 

oacsbr@desktop:~$ env | grep PATH

PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

 

 

Funny thing, speaking about full paths... there is no psql command in
"/usr/bin/"

 

oacsbr@desktop:~$ ls -l /usr/bin/psql

ls: /usr/bin/psql: No such file or directory

 

 

I installed postgresql 8.1 from tarball-source and followed those steps:

http://openacs.org/doc/current/postgres.html

I didn't use apt-get install

 

 

  _____  

From: Iuri Sampaio [mailto:iuri.sampaio@gmail.com] 
Sent: Thursday, September 07, 2006 2:57 AM
To: 'pgsql-admin@postgresql.org'
Subject: psql command

 

The postgres commands work fine to postgres user but it doesn't work to a
random user account

 

I already created the user on postgres

desktop:~# su - postgres

postgres@desktop:~$ createuser -a -d oacsbr

 

and set on .bashrc 

LD_LIBRARY_PATH=:/usr/local/pgsql/lib:/usr/local/pgsql/lib

PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/pgsql/b
in:/usr/local/pgsql/bin

 

 

But somehow I can't run any commands such as 

oacsbr@desktop:~$ createdb -E UNICODE mytestdb

-su: createdb: command not found

oacsbr@desktop:~$ psql -l

-su: psql: command not found

oacsbr@desktop:~$ psql -l mytestdb.dmp mytestdb

-su: psql: command not found

 

 

Does anyone knows what I've missed?

 

iuri

 

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: psql command
@ 2006-09-14 14:24  Thomas Pundt <mlists@rp-online.de>
  parent: Iuri Sampaio <iuri.sampaio@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Thomas Pundt @ 2006-09-14 14:24 UTC (permalink / raw)
  To: iuri.sampaio@computer.org; pgsql-admin

Hi,

On Thursday 07 September 2006 08:00, Iuri Sampaio wrote:
| oacsbr@desktop:~$ env | grep PATH
| PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
|
| Funny thing, speaking about full paths... there is no psql command in
| "/usr/bin/"

that's because it's presumably installed under /usr/local/pgsql/bin --
look at the PATH variable for user postgres or check with "which psql"
as user postgres.

| oacsbr@desktop:~$ ls -l /usr/bin/psql
|
| ls: /usr/bin/psql: No such file or directory
[...]
| The postgres commands work fine to postgres user but it doesn't work to a
| random user account
| and set on .bashrc
|
| LD_LIBRARY_PATH=:/usr/local/pgsql/lib:/usr/local/pgsql/lib
|
| PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/pgsql/
|b in:/usr/local/pgsql/bin
|

you want to repeat this step for other users required to run the "psql"
command.


Ciao,
Thomas

-- 
Thomas Pundt <thomas.pundt@rp-online.de> ---- http://rp-online.de/ ----



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: psql command
@ 2006-09-14 21:51  Tomeh, Husam <htomeh@firstam.com>
  parent: Iuri Sampaio <iuri.sampaio@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tomeh, Husam @ 2006-09-14 21:51 UTC (permalink / raw)
  To: iuri.sampaio@computer.org; pgsql-admin

I can see your PATH variable has the path to postgres bin dir, but still
looks like a environment variables issue.
Have you double-check whether your PATH is exported. Run these at the
Unix command line to make sure:
 
echo $PATH
 
which psql 
 
 
The other thing that I'm not sure about is one of your output lines:
 
                          -su: createdb: command not found
 
I was expecting to see  "-bash"  instead of  "-su"   as the shell name. 
 
--
  Husam
 
 
________________________________

From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Iuri Sampaio
Sent: Wednesday, September 06, 2006 10:57 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] psql command



The postgres commands work fine to postgres user but it doesn't work to
a random user account

 

I already created the user on postgres

desktop:~# su - postgres

postgres@desktop:~$ createuser -a -d oacsbr

 

and set on .bashrc 

LD_LIBRARY_PATH=:/usr/local/pgsql/lib:/usr/local/pgsql/lib

PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/pgs
ql/bin:/usr/local/pgsql/bin

 

 

But somehow I can't run any commands such as 

oacsbr@desktop:~$ createdb -E UNICODE mytestdb

-su: createdb: command not found

oacsbr@desktop:~$ psql -l

-su: psql: command not found

oacsbr@desktop:~$ psql -l mytestdb.dmp mytestdb

-su: psql: command not found

 

 

Does anyone knows what I've missed?

 

iuri

 


**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged.  If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.  If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

                                   FADLD Tag
**********************************************************************

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2006-09-14 21:51 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-09-07 05:56 psql command Iuri Sampaio <iuri.sampaio@gmail.com>
2006-09-14 21:51 ` Tomeh, Husam <htomeh@firstam.com>
2006-09-07 06:00 Re: psql command Iuri Sampaio <iuri.sampaio@gmail.com>
2006-09-14 14:24 ` Thomas Pundt <mlists@rp-online.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox