| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 파이썬
- django
- Apache
- array
- Github
- PANDAS
- Presto
- string
- hive
- c#
- PostgreSQL
- google apps script
- dataframe
- Google Excel
- Python
- math
- gas
- Kotlin
- SQL
- Redshift
- GIT
- list
- numpy
- PySpark
- Google Spreadsheet
- Tkinter
- matplotlib
- Java
- Excel
- Today
- Total
달나라 노트
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
'SQL > Redshift' 카테고리의 다른 글
| Redshift : last_day() (특정 날짜가 속한 월의 가장 마지막 날짜 return) (0) | 2023.02.23 |
|---|---|
| Redshift : table 생성 일시 추출, table 생성 시점 추출 (0) | 2023.01.31 |
| Redshift : set timezone (timezone 설정, 시간대 설정) (0) | 2023.01.31 |
| Redshift : alter table ~ drop column ~ (column 삭제, column 제거) (0) | 2022.10.19 |
| Redshift : alter table ~ add ~ (column 추가, column 추가하기) (0) | 2022.10.19 |