PostgreSQL DDL Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 22: Line 22:


==Drop a Database==
==Drop a Database==
DROP DATABASE


=Tablespace=
=Tablespace=

Revision as of 03:00, 26 November 2017

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

\db