|
Seeing that I can never find this table in my Postgres book, and cannot often find the book or a related URL on the web, I've re-created this table from the book below. This is a table of "List" commands that can be used from the psql command line. These commands help you answer questions like "What tables are in this postgres database?", or "What databases do I have within Postgres?" (a handy question when it comes time for spring cleaning), and other questions. Other popular queries are related to permissions, indexes, views, and sequences.
| Listing |
Command |
Argument |
| Table, index, view, or sequence |
\d |
name |
| Tables |
\dt |
name |
| Indexes |
\di |
name |
| Sequences |
\ds |
name |
| Views |
\dv |
name |
| Permissions |
\dp or \z |
name |
| System tables |
\dS |
name |
| Large objects |
\dl |
name |
| Types |
\dT |
name |
| Functions |
\df |
name |
| Operators |
\do |
name |
| Aggregates |
\da |
name |
| Comments |
\dd |
name |
| Databases |
\l |
name |
|