Login to Postgres
- Make sure you are on the WashJeff campus Wifi network. Postgres will only work when connected to this network!
- Check your email for your username and password.
- Open the Command Prompt (either through Notepad++ or the Start Menu).
- Enter the following command:
psql.exe -h wjcissvr.washjeff.edu -U yourusername -d yourdatabase - When prompted, enter your full password (case sensitive) and press Enter. (It won’t look like you’re typing anything, but this is normal!)
- Look for the prompt
username=>, and you’re ready to go!
Postgres is installed in our classroom and all of the lab computers. If you want to use it on your own machine, you’ll need to install Postgres there yourself.
Common psql Commands
\cConnect to a database\iExecute a script\dList all tables and views of the available schemahelpList allpsqlhelp commands\hList all SQL commands\?List allpsqlcommands\qClose the database connection and exit the program\dnList all viewable schemas\dtList all of the tables in the active schema\lList all viewable databases
If this isn’t working…
Before you login, make sure the PATH is set correctly in your Environmental Variables. If you’re having trouble getting psql to work, this is a likely cause. You’ll need to add the following to your PATH:
C:\Program Files\pgAdmin 4\runtime\