This article describes how to connect to a PostgreSQL database from the command line using the psql program. You can use the psql program as a quick and easy way to access your databases directly.
To connect to PostgreSQL from the command line, follow these steps:
psql dbname username
After you access a PostgreSQL database, you can run SQL queries and more. Here are some common psql commands:
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.