Redshift : pg_tables (table 종류, owner 종류 추출)
select *
from pg_tables
;
Redshift에서는 pg_table를 이용하면 database에 있는 table의 종류와 각 tabe의 owner를 알 수 있습니다.
위 쿼리의 output column은 아래 링크를 보면 됩니다.
https://www.postgresql.org/docs/8.0/view-pg-tables.html
pg_tables
The view pg_tables provides access to useful information about each table in the database. Table 41-37. pg_tables Columns Name Type References Description schemaname name pg_namespace.nspname name of schema containing table tablename name pg_class.relname
www.postgresql.org
FYI
https://docs.aws.amazon.com/redshift/latest/dg/c_join_PG.html
Querying the catalog tables - Amazon Redshift
Querying the catalog tables In general, you can join catalog tables and views (relations whose names begin with PG_) to Amazon Redshift tables and views. The catalog tables use a number of data types that Amazon Redshift does not support. The following dat
docs.aws.amazon.com