Sunday, 27 December 2020

Postgres Frequently used commands - CHEAT SHEET

 \db- List all tablespaces

\dn- List all schemas

\d_\dt- List all tables

\di- List all indexes

\ds- List all sequences

\dv- List all views

\dS- List all PostgreSQL-defined tables

\d table name - Show table definition

\d index name - Show index definition

\d view name - Show view definition

\d sequence name - Show sequence definition

\dp - List all privileges

\dl - List all large objects

\da - List all aggregates

\df - List all functions

\dc - List all conversions

\dC - List all casts

\df function name - List all functions with given name

\do - List all operators

\do operator name - List all operators with given name

\dT - List all types

\dD - List all domains

\dg -\l - List all databases in this cluster



No comments:

Post a Comment