gpt4 book ai didi

amazon-web-services - 如何显示 Redshift Spectrum(外部架构)GRANTS?

转载 作者:行者123 更新时间:2023-12-04 00:27:06 27 4
gpt4 key购买 nike

This post对于显示 Redshift GRANTS 很有用,但不会在外部表/架构上显示 GRANTS。

如何显示外部架构(和相关表)权限?

最佳答案

由于在外部表中只能 select 数据,因此这一项足以检查外部表的 usage 权限:

SELECT schemaname, objectname, usename,
has_schema_privilege(usrs.usename, schemaname, 'usage') AS usage
FROM(
SELECT schemaname, tablename AS objectname, schemaname + '.' + tablename AS fullobj
FROM SVV_EXTERNAL_TABLES
) AS objs,(SELECT * FROM pg_user) AS usrs

关于amazon-web-services - 如何显示 Redshift Spectrum(外部架构)GRANTS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55454108/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com