View a markdown version of this page

SHOW 명령 사용 - Amazon Redshift

Amazon Redshift는 패치 198부터 새 Python UDF 생성을 더 이상 지원하지 않습니다. 기존 Python UDF는 2026년 6월 30일까지 계속 작동합니다. 자세한 내용은 블로그 게시물을 참조하세요.

SHOW 명령 사용

드라이버 메타데이터 API로 사용 사례를 처리할 수 없는 경우 Amazon Redshift SHOW 명령을 사용하여 메타데이터를 검색할 수 있습니다. SHOW 명령은 빠른 메타데이터 검색에 최적화되어 있습니다. 대화형 SQL 세션에 메타데이터가 필요하거나 애플리케이션이 드라이버 메타데이터 API를 노출하지 않는 클라이언트를 통해 연결될 때 유용합니다.

일반적인 검색 작업에는 다음 SHOW 명령이 지원됩니다.

예제

SHOW SCHEMAS FROM DATABASE dev; database_name | schema_name | schema_owner | schema_type | schema_acl | source_database | schema_option ---------------+----------------------+--------------+-------------+-----------------------------+-----------------+--------------- dev | pg_automv | 1 | local | | | dev | pg_catalog | 1 | local | jpuser=UC/jpuser~=U/jpuser | | dev | public | 1 | local | jpuser=UC/jpuser~=UC/jpuser | | dev | information_schema | 1 | local | jpuser=UC/jpuser~=U/jpuser | | dev | schemad79cd6d93bf043 | 1 | local | | |
SHOW TABLES FROM SCHEMA dev.s1 LIKE '%view' LIMIT 1; database_name | schema_name | table_name | table_type | table_acl | remarks | owner | last_altered_time | last_modified_time | dist_style | table_subtype ---------------+-------------+-------------------+------------+--------------------------------------+---------+-------+-------------------+--------------------+------------+------------------- dev | s1 | late_binding_view | VIEW | {alice=arwdRxtDPA/alice,bob=d/alice} | | alice | | | | LATE BINDING VIEW
SHOW COLUMNS FROM TABLE second_db.public.t22; database_name | schema_name | table_name | column_name | ordinal_position | column_default | is_nullable | data_type | character_maximum_length | numeric_precision | numeric_scale | remarks | sort_key_type | sort_key | dist_key | encoding | collation ---------------+-------------+------------+-------------+------------------+----------------+-------------+-----------------------------+--------------------------+-------------------+---------------+---------+---------------+----------+----------+----------+----------- second_db | public | t22 | col1 | 1 | | YES | integer | | 32 | 0 | | INTERLEAVED | -1 | | mostly8 | second_db | public | t22 | col2 | 2 | | YES | character varying | 100 | | | | INTERLEAVED | 2 | | text255 | default second_db | public | t22 | col3 | 3 | | YES | timestamp without time zone | | | | | | 0 | | raw | second_db | public | t22 | col4 | 4 | | YES | numeric | | 10 | 2 | | | 0 | | az64 |

자세한 내용은 Amazon Redshift 데이터베이스 개발자 안내에서 SHOW를 참조하세요.