til.duyet.net
til.duyet.net
blog
til.duyet.net
til.duyet.net
Today I Learned
Python
date_range_generator
get_all_s3_keys
Pipenv
YAML config file with environment variables
Database
Athena - Add Partition
Redshift - Check the table size
Redshift - tables and their owners
Redshift - GRANT
Postgres - List tables
Hive - SHOW schemas/tables/create
Postgres - Index Summary
Bigquery - Sample queries for audiences based
Bigquery - UNNEST in SELECT
Data Engineer
Tools
EMR
Kubernetes
Helm Charts
Apache Airflow
Unix
Docker cleanup
Git - Pretty git branch graphs
K8S - Port Forward
Checking files in Docker build context
Bash get the directory of the current script
Articles
Miscellaneous
[Fig] Single machine and distributed system structure
Deploying Machine Learning Models at Scale
Go
Functions and Methods in Go?
Powered by GitBook

Postgres - List tables

Using psql

\dt
# \dt
List of relations
Schema | Name | Type | Owner
--------+---------------+-------+----------
public | actor | table | postgres
public | address | table | postgres
public | category | table | postgres
....

Using pg_catalog schema

SELECT
*
FROM
pg_catalog.pg_tables
WHERE
schemaname != 'pg_catalog'
AND schemaname != 'information_schema';

Reference:

  • ​http://www.postgresqltutorial.com/postgresql-show-tables/​

Database - Previous
Redshift - GRANT
Next - Database
Hive - SHOW schemas/tables/create
Last updated 1 year ago
Edit on GitHub
Contents
Using psql
Using pg_catalog schema