I wrote a web app, using java + spring+ PostgreSQL, which I have up and running.
I have a tester for my system and I want him to be able to connect to my database directly to check the result of interaction with application. As always, the web is littered with articles on how to connect, but one simple thing they don't mention is whether a client should install some app to connect to the database? I get the bit about making correct settings for the database, but if a mere mortal enters the following in their windows console:
psql -h <host> -p <port> -u <database>
they will get 'psql' is not recognized as an internal or external command, operable program or batch file. I understand I don't get that error because I operate via shell and my home path is set to psql.exe, but again the client doesn't need to install PostgreSQL to access remote a PostgreSQL database. It just doesn't click in my head.
How can a client connect to database via command prompt without installing anything?
pg_hba.conf
to ensure that the server is accessible. Also,psql.exe
needs to be on thePATH
. This can be obtained from postgresql.org and downloaded from the "advanced" binaries download (no installer).