Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I started working with PostgreSQL and till now I only had issues with it ( pgAdmin3 issues the most ) now I work a lot with MySQL and sometimes on the command line by just doing

mysql -u ... -h localhost -p for example and I'm connected through the command line.

Is there also a way to connect to the PostgreSQL database without pgAdmin and run it through the command line (Terminal) (I am working on OS X Mountain Lion).

p.s. I am also not a real big fan of letting PostgreSQL create a user. It annoys me when I start up my Mac and see PostgreSQL as user in the login screen. Is it possible to avoid that?

share|improve this question
1  
See support.apple.com/kb/ht5017?viewlocale=en_us&locale=en_us for information about hiding users in Mac OS X. –  Colin 't Hart Apr 17 '13 at 8:09
add comment

1 Answer

up vote 4 down vote accepted

The PostgreSQL command line client is called psql. You can do pretty much everything with it (apart from taking dumps, for example), you'd better reading its documentation. Try running locate psql in a terminal and you will find its binary.

As far as I know, on OS X (and typically on other systems, too) pgAdmin is bundled with the server package, so you won't be able to install PostgreSQL without it. Here I am not very well informed, so handle this with care.

Regarding the postgres user, on linux machines it is a must to have it (and again, it looks the same on all other systems, too), you simply cannot run the server with other users. If you don't use PostgreSQL, the user will sit there quietly, won't eat your food and drink your beer, so you need not to worry about it.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.