LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   PostgreSQL Client Application (https://www.linuxquestions.org/questions/linux-server-73/postgresql-client-application-861188/)

carlosinfl 02-07-2011 10:35 AM

PostgreSQL Client Application
 
I would like to be able to connect to my PostgreSQL server in the office without having to always SSH to the server and then use the client on the server. Can I simply not use a client on my workstation and connect using:

Code:

psql -h 192.168.1.200 -d dbname
I don't want to install the database application daemon on my workstation as I find that to be extremely overkill in order to just connect via CLI to a database server. I would think there has to be a separate client application I can install, no?

jcalzare 02-07-2011 10:41 AM

Yes, you can just install postgresql rather than postgresql-server on your workstation. The package names will vary depending on what distro you are using, but the names I mentioned should be correct for fedora. This will provide you with the psql utility. You'll need to allow your workstation's IP to connect in pg_hba.conf also.

carlosinfl 02-07-2011 10:45 AM

Looks like in my distribution (Arch Linux) there is no separate package between server / client. When I did a search on my workstation, I had the following installed:

Code:

[cmennens@tuna ~]$ pacman -Qs postgresql
local/postgresql-libs 9.0.2-2
    Libraries for use with PostgreSQL

I can't install PostgreSQL server on my workstation even if I don't start the daemon as it's not authorized by my companies policy. Only if there is a separate package for the client, not the server. :(

jcalzare 02-07-2011 11:21 AM

That's a shame. I guess, in that case, you could compile postgres from source, and delete the postgres binary from /usr/local/pgsql/bin/postgres ? That would remove the db server, but psql would still be in the bin directory. Alternatively you could look for third-party client software, I don't have any experience with that though.


All times are GMT -5. The time now is 08:17 AM.