반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- matplotlib
- math
- SQL
- django
- Kotlin
- Github
- string
- Tkinter
- google apps script
- Google Spreadsheet
- Apache
- numpy
- Java
- Redshift
- Google Excel
- hive
- list
- c#
- gas
- 파이썬
- Mac
- Python
- PostgreSQL
- GIT
- dataframe
- PySpark
- array
- Excel
- PANDAS
Archives
- Today
- Total
목록pg_user (1)
달나라 노트
Redshift : pg_catalog.pg_namespace, pg_catalog.pg_user (Schema list)
pg_catalog를 이용하면 DB에 있는 Schema list를 얻을 수 있습니다. select * from pg_catalog.pg_namespace ; pg_catalog의 pg_namespace에서 select를 하면 schema list와 schema의 owner id를 얻을 수 있습니다. select * from pg_catalog.pg_user ; pg_catalog.pg_user에는 user 정보가 저장되어있습니다. pg_user의 usesysid 컬럼과 pg_namespace의 nspowner 컬럼이 user id를 의미하므로 이 두 컬럼을 join하서 사용하면 됩니다.
SQL/Redshift
2022. 5. 24. 19:02