Connect to PostgreSQL as postgres

Open a psql session as the postgres superuser.

Connects to a PostgreSQL database using the psql interactive terminal. The -U flag specifies the role; PostgreSQL uses peer auth for local connections by default.

When you need this: When you need to run SQL queries, inspect tables, or troubleshoot database issues.

Variables

Command


        
7 views 0 copies
Log in to rate
Log in to save

Free account. Save snippets into your own collections.