Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed postgresql as well as postgresql-doc, nevertheless it seems that ubuntu either does not put commands in my path, or if it does put them in my path, it removes the man pages for the corresponding command. There is some logic that ensures that if a command is in the path, the man page is not, or vice versa. Not sure if this is a joke, error, or both:

to wit:

postgres@ubuntu:~$ man pg_ctl  #this works!
postgres@ubuntu:~$ which pg_ctl #not in my path

postgres@ubuntu:~$ man psql
No manual entry for psql
See 'man 7 undocumented' for help when manual pages are not available.

postgres@ubuntu:~$ which psql  #command is my path!
/usr/bin/psql

This is the same for whether I log in as my regular user or as the postgres user.

Anyone know how to get ubuntu to install both commands and man pages for the commands?

For the life of me, I can't find where the $PGDATA dir is, either. I would install postgres by source, but a package will notify me of updates. I looked on ubuntu's wiki (a single page) and couldn't find anything that talked about man pages, paths, or PGDATA. Am on ubuntu 12.10

share|improve this question

migrated from stackoverflow.com Feb 19 '13 at 7:30

This question came from our site for professional and enthusiast programmers.

    
To find the data directory. This question will probably be closed as being off-topic. –  Mike Sherrill 'Cat Recall' Feb 19 '13 at 0:58
    
Just run apt-get install postgresql-client –  Daniel Vérité Feb 19 '13 at 1:29

1 Answer 1

The server-side commands are under /usr/lib/postgresql/X.Y/bin so that multiple major versions can be installed in parallel. Normally, you don't actually need to call these directly. For example, instead of pg_ctl you could call pg_ctlcluster (see its man page). See the documentation under /usr/share/doc/postgresql-common/ for details. (If you wanted to, you could put /usr/lib/postgresql/X.Y/bin into your path, of course.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.