Classify all tables

0

I would like to know the type of all tables on Redshift so I think two relevant tables would be svv_table_info and svv_all_tables. However, I can join them to extract the information I need due to the following error:

ERROR: Specified types or functions (one per INFO message) not supported on Redshift tables. Warnings: Column "pgc.relacl" has unsupported type "aclitem[]". Function "array_to_string(anyarray,text)" not supported. Function "has_table_privilege(name,oid,text)" not supported. Function "has_schema_privilege(name,text,text)" not supported.

Can you advise me on this please?

  • Would you share your query?

질문됨 일 년 전297회 조회
1개 답변
0

Hello,

I understood that you are facing error below :

ERROR: Specified types or functions (one per INFO message) not supported on Redshift tables. Warnings: Column "pgc.relacl" has unsupported type "aclitem[]". Function "array_to_string(anyarray,text)" not supported. Function "has_table_privilege(name,oid,text)" not supported. Function "has_schema_privilege(name,text,text)" not supported.

To help you, please share your query.

Based on the error statement, the expected situation is as follows :

"has_schema_privilege()" is a leader node function. It cannot be executed on compute nodes. The leader node distributes SQL to the compute nodes when a query references user-created tables or system tables (tables with an STL or STV prefix and system views with an SVL or SVV prefix). A query that references only catalog tables (tables with a PG prefix, such as PG_TABLE_DEF) or that does not reference any tables, runs exclusively on the leader node.

If you are trying to run query at system tables with catalog tables, Redshift will attempt to execute the query on compute nodes. Since has_schema_privilege() can't run on compute nodes, you end up hitting the error. This is an expected behavior.

To conclude,It occurs due to how Redshift handles queries [1] where when a query references catalog tables (tables with a PG prefix, such as PG_TABLE_DEF), it runs exclusively on the leader node.

I hope you find the information helpful.

[1] Leader node–only functions - https://docs.aws.amazon.com/redshift/latest/dg/c_SQL_functions_leader_node_only.html

profile pictureAWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠