Programming/PostgreSQL/Table Queries
< Programming | PostgreSQL
Jump to navigation
Jump to search
All of the following assume you have first loaded a database.
Show Tables
\dt
Or for expanded data:
\dt+
Alternatively:
SELECT * FROM pg_catalog.pg_tables;
Show Extra Relational Data About Table
\d <table_name>
Show Table Indexes
SELECT indexname, indexdef FROM pg_indexes WHERE tablename = '<table_name>';