PostgreSQL DDL Operations

From NovaOrdis Knowledge Base
Revision as of 03:02, 26 November 2017 by Ovidiu (talk | contribs) (→‎Tablespace)
Jump to navigation Jump to search

Internal

Database

List Databases

psql -l

or

SELECT datname FROM pg_database;

Create a Database

createdb <dbname>

or

CREATE DATABASE

Drop a Database

DROP DATABASE

Tablespace

List Tablespaces

psql
\db

Users

List Users

psql
\du