Skip to Content
Trino 权威指南:原书第2版
book

Trino 权威指南:原书第2版

by Matt Fuller, Manfred Moser, Martin Traverso
July 2023
Intermediate to advanced
278 pages
5h 40m
Chinese
China Machine Press
Content preview from Trino 权威指南:原书第2版
204
|
10
让我们再次使用
flights
表的例子,并使用角色:
CREATE ROLE admin;
GRANT SELECT, DELETE on datalake.ontime.flights TO admin;
GRANT admin TO USER matt, martin;
现在,假设你想移除一个用户的权限。你可以简单地从用户身上移除相关角色,而不必
移除赋予该用户对象的所有权限:
REVOKE admin FROM USER matt;
除了移除分配给用户的角色之外,还可以从角色中移除权限,使该角色的所有用户不再
拥有该权限:
REVOKE DELETE ON datalake.ontime.flights FROM admin;
在这个例子中,我们撤销了
admin
角色在
flights
表上的
DELETE
权限。但是,
admin
色及其成员仍然拥有
SELECT
权限。
用户可能属于多个角色,而这些角色可能有独立或交叉的权限集合。当用户运行查询
时,
Trino
检查用户自己的权限和通过角色分配到的权限。如果你只想使用自己所属的
单个角色的权限,则可以使用
SET ROLE
命令。例如,假设你同时属于
admin
角色和
developer
角色,可以通过以下命令只使用分配给
developer
角色的权限:
SET ROLE developer;
你还可以将角色设置为
ALL
,这时
Trino
会检查你所属每个角色的权限。当然,也可以
将其设置为
NONE
10.3
加密
加密是将数据从可读格式转化为不可读格式的过程,可用于传输或存储 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

What Successful Brick-and-Mortar Retailers Get Right

What Successful Brick-and-Mortar Retailers Get Right

Rob Angell
Three Essentials for Agentic AI Security

Three Essentials for Agentic AI Security

Paolo Dal Cin, Daniel Kendzior, Yusof Seedat, Renato Marinho
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9787111731603