til.duyet.net
blog
Search…
til.duyet.net
🤪
Today I Learned
Data Engineering
☁
AWS
⚒
Tools
💻
Shell
☸
Kubernetes, Helm, Kustomize
🔄
Apache Airflow
🐳
Docker
Database
Google BigQuery
Apache Hive
AWS Redshift / Postgres
Amazon Redshift Utilities
Postgres - Index Summary
Postgres - List tables
Redshift - GRANT
Redshift - tables and their owners
Redshift - Check the table size
Presto
Programming
🍪
Rust
🐍
Python
👻
Golang
💎
Javascript / Typescript
✨
FE / React
Unix
Git - Pretty git branch graphs
Checking files in Docker build context
Bash get the directory of the current script
Vim
Find and replace
Miscellaneous
[Fig] Single machine and distributed system structure
Deploying Machine Learning Models at Scale
Bypass a Chrome certificate/HSTS error
Articles
Powered By GitBook
Postgres - List tables

Using psql

1
\dt
Copied!
1
# \dt
2
List of relations
3
Schema | Name | Type | Owner
4
--------+---------------+-------+----------
5
public | actor | table | postgres
6
public | address | table | postgres
7
public | category | table | postgres
8
....
Copied!

Using pg_catalog schema

1
SELECT
2
*
3
FROM
4
pg_catalog.pg_tables
5
WHERE
6
schemaname != 'pg_catalog'
7
AND schemaname != 'information_schema';
Copied!
Reference:
  • ​http://www.postgresqltutorial.com/postgresql-show-tables/​
Previous
Postgres - Index Summary
Next
Redshift - GRANT
Last modified 2yr ago
Copy link
Edit on GitHub
Contents
Using psql
Using pg_catalog schema