1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-05 08:08:02 +00:00

Add List Various Kinds Of Objects as a postgres til

This commit is contained in:
jbranchaud
2016-04-17 11:51:16 -05:00
parent 771724f5f4
commit 46d732532d
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# List Various Kinds Of Objects
Our PostgreSQL database can end up with all kinds of objects: tables,
sequences, views, etc. We can use a variety of `psql` meta-commands to list
the different types of (user-created) objects in our database.
- `\dt` will list all the tables
- `\dE` will list all the foreign tables
- `\di` will list all the indexes
- `\ds` will list all the sequences
- `\dv` will list all the views
- `\dm` will list all the materialized views
These can also be combined. For instance, to see all the tables and
sequences, we can run `\dts`.