Skip to content

Latest commit

 

History

History

postgres

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Postgres

Docs

Installation

Management Commands

Common commands

CLI

Start server

sudo service postgresql start

Switch role to postgres

sudo -i -u postgres

Start client

psql

List all users

\du

List all databases

\l

List available tables in database

\dt

Describe table

\d table_name

List available schema

\dn

Switch to new database

\c dbname username
  • A new username can be specified after database name, if omitted current user is used

\dt