<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Granting and revoking privileges</title>
    <link>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/</link>
    <description>Recent content in Granting and revoking privileges on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin: Superuser privileges</title>
      <link>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/superuser-privileges/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/superuser-privileges/</guid>
      <description>
        
        
        &lt;p&gt;A superuser is a database user—by default, &lt;a href=&#34;../../../../../en/admin/db-users-and-privileges/db-users/types-of-db-users/db-admin-user/&#34;&gt;named &lt;code&gt;dbadmin&lt;/code&gt;&lt;/a&gt;—that is automatically created on installation. Superusers have complete and irrevocable authority over database users, privileges, and roles.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
Database superusers are not the same as Linux superusers with (root) privileges.
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Superusers can change the privileges of any user and role, as well as override any privileges that are granted by users with the &lt;a href=&#34;../../../../../en/admin/db-users-and-privileges/db-roles/predefined-db-roles/pseudosuperuser/&#34;&gt;PSEUDOSUPERUSER&lt;/a&gt; role. They can also grant and revoke privileges on any user-owned object, and reassign object ownership.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

A superuser always changes a user&#39;s privileges on an object on behalf of the object owner. Thus, the &lt;code&gt;grantor&lt;/code&gt; setting in system table &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-catalog-schema/grants/&#34;&gt;V_CATALOG.GRANTS&lt;/a&gt; always shows the object owner rather than the superuser who issued the GRANT statement.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;cryptographic-privileges&#34;&gt;Cryptographic privileges&lt;/h2&gt;
&lt;p&gt;For most catalog objects, superusers have all possible privileges. However, for &lt;a href=&#34;../../../../../en/sql-reference/statements/create-statements/create-key/&#34;&gt;keys&lt;/a&gt;, &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-catalog-schema/certificates/&#34;&gt;certificates&lt;/a&gt;, and &lt;a href=&#34;../../../../../en/sql-reference/statements/create-statements/create-tls-config/&#34;&gt;TLS Configurations&lt;/a&gt; superusers only get DROP privileges by default and must be granted the other privileges by their owners. For details, see &lt;a href=&#34;../../../../../en/sql-reference/statements/grant-statements/grant-key/#&#34;&gt;GRANT (key)&lt;/a&gt; and &lt;a href=&#34;../../../../../en/sql-reference/statements/grant-statements/grant-tls-config/#&#34;&gt;GRANT (TLS configuration)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Superusers can see the existence of all &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-catalog-schema/cryptographic-keys/&#34;&gt;keys&lt;/a&gt;, &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-catalog-schema/certificates/&#34;&gt;certificates&lt;/a&gt;, and &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/tls-configs/&#34;&gt;TLS Configurations&lt;/a&gt;, but they cannot see the text of keys or certificates unless they are granted USAGE privileges.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../../en/admin/db-users-and-privileges/db-roles/predefined-db-roles/dbadmin/#&#34;&gt;DBADMIN&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Schema owner privileges</title>
      <link>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/schema-owner-privileges/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/schema-owner-privileges/</guid>
      <description>
        
        
        &lt;p&gt;The schema owner is typically the user who creates the schema. By default, the schema owner has privileges to create objects within a schema. The owner can also alter the schema: reassign ownership, rename it, and &lt;a href=&#34;../../../../../en/admin/db-users-and-privileges/db-privileges/inherited-privileges/enabling-schema-inheritance/&#34;&gt;enable or disable&lt;/a&gt; inheritance of schema privileges.&lt;/p&gt;
&lt;p&gt;Schema ownership does not necessarily grant the owner access to objects in that schema. Access to objects depends on the privileges that are granted on them.&lt;/p&gt;
&lt;p&gt;All other users and roles must be explicitly &lt;a href=&#34;../../../../../en/sql-reference/statements/grant-statements/grant-schema/&#34;&gt;granted access to a schema&lt;/a&gt; by its owner or a superuser.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Object owner privileges</title>
      <link>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/object-owner-privileges/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/object-owner-privileges/</guid>
      <description>
        
        
        &lt;p&gt;The database, along with every object in it, has an owner. The object owner is usually the person who created the object, although a superuser can alter ownership of objects, such as table and sequence.&lt;/p&gt;
&lt;p&gt;Object owners must have appropriate schema privilege to access, alter, rename, move or drop any object it owns without any additional privileges.&lt;/p&gt;
&lt;p&gt;An object owner can also:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Grant privileges on their own object to other users&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The WITH GRANT OPTION clause specifies that a user can grant the permission to other users. For example, if user Bob creates a table, Bob can grant privileges on that table to users Ted, Alice, and so on.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Grant privileges to&lt;/strong&gt; &lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/role/&#34; title=&#34;A role groups together a set of privileges that can be assigned to a user or another role.&#34;&gt;roles &lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Users who are granted the role gain the privilege.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Granting privileges</title>
      <link>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/granting-privileges/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/granting-privileges/</guid>
      <description>
        
        
        &lt;p&gt;As described in &lt;a href=&#34;../../../../../en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/#&#34;&gt;Granting and revoking privileges&lt;/a&gt;, specific users grant privileges using the GRANT statement with or without the optional WITH GRANT OPTION, which allows the user to grant the same privileges to other users.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A &lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/db-superuser/&#34; title=&#34;&#34;&gt;superuser&lt;/a&gt; can grant privileges on all object types to other users.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A superuser or object owner can grant privileges to &lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/role/&#34; title=&#34;A role groups together a set of privileges that can be assigned to a user or another role.&#34;&gt;roles&lt;/a&gt;. Users who have been granted the role then gain the privilege.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An object owner can grant privileges on the object to other users using the optional WITH GRANT OPTION clause.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The user needs to have USAGE privilege on schema and appropriate privileges on the object.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a user grants an explicit list of privileges, such as &lt;code&gt;GRANT INSERT, DELETE, REFERENCES ON applog TO Bob&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The GRANT statement succeeds only if all the roles are granted successfully. If any grant operation fails, the entire statement rolls back.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The database returns ERROR if the user does not have grant options for the privileges listed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a user grants ALL privileges, such as &lt;code&gt;GRANT ALL ON applog TO Bob&lt;/code&gt;, the statement always succeeds. The database grants all the privileges on which the grantor has the WITH GRANT OPTION and skips those privileges without the optional WITH GRANT OPTION.&lt;/p&gt;
&lt;p&gt;For example, if the user Bob has delete privileges with the optional grant option on the applog table, only DELETE privileges are granted to Bob, and the statement succeeds:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; GRANT DELETE ON applog TO Bob WITH GRANT OPTION;GRANT PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For details, see the &lt;a href=&#34;../../../../../en/sql-reference/statements/grant-statements/#&#34;&gt;GRANT statements&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Revoking privileges</title>
      <link>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/revoking-privileges/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/revoking-privileges/</guid>
      <description>
        
        
        &lt;p&gt;The following non-superusers can revoke privileges on an object:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Object owner&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Grantor of the object privileges&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The user also must have USAGE privilege on the object&#39;s schema.&lt;/p&gt;
&lt;p&gt;For example, the following query on system table &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-catalog-schema/grants/&#34;&gt;&lt;code&gt;V_CATALOG.GRANTS&lt;/code&gt;&lt;/a&gt; shows that users &lt;code&gt;u1&lt;/code&gt;, &lt;code&gt;u2&lt;/code&gt;, and &lt;code&gt;u3&lt;/code&gt; have the following privileges on schema &lt;code&gt;s1&lt;/code&gt; and table &lt;code&gt;s1.t1&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt; =&amp;gt; SELECT object_type, object_name, grantee, grantor, privileges_description FROM v_catalog.grants
     WHERE object_name IN (&amp;#39;s1&amp;#39;, &amp;#39;t1&amp;#39;) AND grantee IN (&amp;#39;u1&amp;#39;, &amp;#39;u2&amp;#39;, &amp;#39;u3&amp;#39;);
object_type | object_name | grantee | grantor |  privileges_description
-------------+-------------+---------+---------+---------------------------
 SCHEMA      | s1          | u1      | dbadmin | USAGE, CREATE
 SCHEMA      | s1          | u2      | dbadmin | USAGE, CREATE
 SCHEMA      | s1          | u3      | dbadmin | USAGE
 TABLE       | t1          | u1      | dbadmin | INSERT*, SELECT*, UPDATE*
 TABLE       | t1          | u2      | u1      | INSERT*, SELECT*, UPDATE*
 TABLE       | t1          | u3      | u2      | SELECT*
(6 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The asterisks (*) on privileges under &lt;code&gt;privileges_description&lt;/code&gt; indicate that the grantee can grant these privileges to other users.

&lt;/div&gt;
&lt;p&gt;In the following statements, &lt;code&gt;u2&lt;/code&gt; revokes the SELECT privileges that it granted on &lt;code&gt;s1.t1&lt;/code&gt; to &lt;code&gt;u3&lt;/code&gt; . Subsequent attempts by &lt;code&gt;u3&lt;/code&gt; to query this table return an error:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - u2
You are now connected as user &amp;#34;u2&amp;#34;.
=&amp;gt; REVOKE SELECT ON s1.t1 FROM u3;
REVOKE PRIVILEGE
=&amp;gt; \c - u3
You are now connected as user &amp;#34;u2&amp;#34;.
=&amp;gt; SELECT * FROM s1.t1;
ERROR 4367:  Permission denied for relation t1
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;revoking-grant-option&#34;&gt;Revoking grant option&lt;/h2&gt;
&lt;p&gt;If you revoke privileges on an object from a user, that user can no longer act as grantor of those same privileges to other users. If that user previously granted the revoked privileges to other users, the &lt;code&gt;REVOKE&lt;/code&gt; statement must include the &lt;code&gt;CASCADE&lt;/code&gt; option to revoke the privilege from those users too; otherwise, it returns with an error.&lt;/p&gt;
&lt;p&gt;For example, user &lt;code&gt;u2&lt;/code&gt; can grant SELECT, INSERT, and UPDATE privileges, and grants those privileges to user &lt;code&gt;u4&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - u2
You are now connected as user &amp;#34;u2&amp;#34;.
=&amp;gt; GRANT SELECT, INSERT, UPDATE on TABLE s1.t1 to u4;
GRANT PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you query &lt;code&gt;V_CATALOG.GRANTS&lt;/code&gt; for privileges on table &lt;code&gt;s1.t1&lt;/code&gt;, it returns the following result set:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \ c
You are now connected as user &amp;#34;dbadmin&amp;#34;.
=&amp;gt; SELECT object_type, object_name, grantee, grantor, privileges_description FROM v_catalog.grants
     WHERE object_name IN (&amp;#39;t1&amp;#39;) ORDER BY grantee;
 object_type | object_name | grantee | grantor |                   privileges_description
-------------+-------------+---------+---------+------------------------------------------------------------
 TABLE       | t1          | dbadmin | dbadmin | INSERT*, SELECT*, UPDATE*, DELETE*, REFERENCES*, TRUNCATE*
 TABLE       | t1          | u1      | dbadmin | INSERT*, SELECT*, UPDATE*
 TABLE       | t1          | u2      | u1      | INSERT*, SELECT*, UPDATE*
 TABLE       | t1          | u4      | u2      | INSERT, SELECT, UPDATE
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now, if user &lt;code&gt;u1&lt;/code&gt; wants to revoke UPDATE privileges from user &lt;code&gt;u2&lt;/code&gt;, the revoke operation must cascade to user &lt;code&gt;u4&lt;/code&gt;, who also has UPDATE privileges that were granted by &lt;code&gt;u2&lt;/code&gt;; otherwise, the &lt;code&gt;REVOKE&lt;/code&gt; statement returns with an error:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - u1
=&amp;gt; REVOKE update ON TABLE s1.t1 FROM u2;
ROLLBACK 3052:  Dependent privileges exist
HINT:  Use CASCADE to revoke them too
=&amp;gt; REVOKE update ON TABLE s1.t1 FROM u2 CASCADE;
REVOKE PRIVILEGE
=&amp;gt; \c
You are now connected as user &amp;#34;dbadmin&amp;#34;.
=&amp;gt;  SELECT object_type, object_name, grantee, grantor, privileges_description FROM v_catalog.grants
     WHERE object_name IN (&amp;#39;t1&amp;#39;) ORDER BY grantee;
 object_type | object_name | grantee | grantor |                   privileges_description
-------------+-------------+---------+---------+------------------------------------------------------------
 TABLE       | t1          | dbadmin | dbadmin | INSERT*, SELECT*, UPDATE*, DELETE*, REFERENCES*, TRUNCATE*
 TABLE       | t1          | u1      | dbadmin | INSERT*, SELECT*, UPDATE*
 TABLE       | t1          | u2      | u1      | INSERT*, SELECT*
 TABLE       | t1          | u4      | u2      | INSERT, SELECT
(4 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can also revoke grantor privileges from a user without revoking those privileges. For example, user &lt;code&gt;u1&lt;/code&gt; can prevent user &lt;code&gt;u2&lt;/code&gt; from granting INSERT privileges to other users, but allow user &lt;code&gt;u2&lt;/code&gt; to retain that privilege:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - u1
You are now connected as user &amp;#34;u1&amp;#34;.
=&amp;gt; REVOKE GRANT OPTION FOR INSERT ON TABLE s1.t1 FROM U2 CASCADE;
REVOKE PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The REVOKE statement must include the CASCADE, because user &lt;code&gt;u2&lt;/code&gt; previously granted user &lt;code&gt;u4&lt;/code&gt; INSERT privileges on table &lt;code&gt;s1.t1&lt;/code&gt;. When you revoke &lt;code&gt;u2&lt;/code&gt;&#39;s ability to grant this privilege, that privilege must be removed from any its grantees—in this case, user &lt;code&gt;u4&lt;/code&gt;.

&lt;/div&gt;
&lt;p&gt;You can confirm results of the revoke operation by querying &lt;code&gt;V_CATALOG.GRANTS&lt;/code&gt; for privileges on table &lt;code&gt;s1.t1&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; \c
You are now connected as user &amp;#34;dbadmin&amp;#34;.
=&amp;gt; SELECT object_type, object_name, grantee, grantor, privileges_description FROM v_catalog.grants
      WHERE object_name IN (&amp;#39;t1&amp;#39;) ORDER BY grantee;
 object_type | object_name | grantee | grantor |                   privileges_description
-------------+-------------+---------+---------+------------------------------------------------------------
 TABLE       | t1          | dbadmin | dbadmin | INSERT*, SELECT*, UPDATE*, DELETE*, REFERENCES*, TRUNCATE*
 TABLE       | t1          | u1      | dbadmin | INSERT*, SELECT*, UPDATE*
 TABLE       | t1          | u2      | u1      | INSERT, SELECT*
 TABLE       | t1          | u4      | u2      | SELECT
(4 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The query results show:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;User &lt;code&gt;u2&lt;/code&gt; retains INSERT privileges on the table but can no longer grant INSERT privileges to other users (as indicated by absence of an asterisk).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The revoke operation cascaded down to grantee &lt;code&gt;u4&lt;/code&gt;, who now lacks INSERT privileges.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../../en/sql-reference/statements/revoke-statements/revoke-table/#&#34;&gt;REVOKE (table)&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Privilege ownership chains</title>
      <link>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/privilege-ownership-chains/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/db-users-and-privileges/db-privileges/granting-and-revoking-privileges/privilege-ownership-chains/</guid>
      <description>
        
        
        &lt;p&gt;The ability to revoke privileges on objects can cascade throughout an organization. If the grant option was revoked from a user, the privilege that this user granted to other users will also be revoked.&lt;/p&gt;
&lt;p&gt;If a privilege was granted to a user or role by multiple grantors, to completely revoke this privilege from the grantee the privilege has to be revoked by each original grantor. The only exception is a superuser may revoke privileges granted by an object owner, with the reverse being true, as well.&lt;/p&gt;
&lt;p&gt;In the following example, the SELECT privilege on table t1 is granted through a chain of users, from a superuser through User3.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A superuser grants User1 CREATE privileges on the schema s1:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - dbadmin
You are now connected as user &amp;#34;dbadmin&amp;#34;.
=&amp;gt; CREATE USER User1;
CREATE USER
=&amp;gt; CREATE USER User2;
CREATE USER
=&amp;gt; CREATE USER User3;
CREATE USER
=&amp;gt; CREATE SCHEMA s1;
CREATE SCHEMA
=&amp;gt; GRANT USAGE on SCHEMA s1 TO User1, User2, User3;
GRANT PRIVILEGE
=&amp;gt; CREATE ROLE reviewer;
CREATE ROLE
=&amp;gt; GRANT CREATE ON SCHEMA s1 TO User1;
GRANT PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User1 creates new table t1 within schema s1 and then grants SELECT WITH GRANT OPTION privilege on s1.t1 to User2:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - User1
You are now connected as user &amp;#34;User1&amp;#34;.
=&amp;gt; CREATE TABLE s1.t1(id int, sourceID VARCHAR(8));
CREATE TABLE
=&amp;gt; GRANT SELECT on s1.t1 to User2 WITH GRANT OPTION;
GRANT PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User2 grants SELECT WITH GRANT OPTION privilege on s1.t1 to User3:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - User2
You are now connected as user &amp;#34;User2&amp;#34;.
=&amp;gt; GRANT SELECT on s1.t1 to User3 WITH GRANT OPTION;
GRANT PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User3 grants SELECT privilege on s1.t1 to the reviewer role:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - User3
You are now connected as user &amp;#34;User3&amp;#34;.
=&amp;gt; GRANT SELECT on s1.t1 to reviewer;
GRANT PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Users cannot revoke privileges upstream in the chain. For example, User2 did not grant privileges on User1, so when User1 runs the following REVOKE command, the database rolls back the command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - User2
You are now connected as user &amp;#34;User2&amp;#34;.
=&amp;gt; REVOKE CREATE ON SCHEMA s1 FROM User1;
ROLLBACK 0:  &amp;#34;CREATE&amp;#34; privilege(s) for schema &amp;#34;s1&amp;#34; could not be revoked from &amp;#34;User1&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Users can revoke privileges indirectly from users who received privileges through a cascading chain, like the one shown in the example above. Here, users can use the CASCADE option to revoke privileges from all users &amp;quot;downstream&amp;quot; in the chain. A superuser or User1 can use the CASCADE option to revoke the SELECT privilege on table s1.t1 from all users. For example, a superuser or User1 can execute the following statement to revoke the SELECT privilege from all users and roles within the chain:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - User1
You are now connected as user &amp;#34;User1&amp;#34;.
=&amp;gt; REVOKE SELECT ON s1.t1 FROM User2 CASCADE;
REVOKE PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When a superuser or User1 executes the above statement, the SELECT privilege on table s1.t1 is revoked from User2, User3, and the reviewer role. The GRANT privilege is also revoked from User2 and User3, which a superuser can verify by querying the &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-catalog-schema/grants/&#34;&gt;V_CATALOG.GRANTS&lt;/a&gt; system table.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM grants WHERE object_name = &amp;#39;s1&amp;#39; AND grantee ILIKE &amp;#39;User%&amp;#39;;
 grantor | privileges_description | object_schema | object_name | grantee
---------+------------------------+---------------+-------------+---------
 dbadmin | USAGE                  |               | s1          | User1
 dbadmin | USAGE                  |               | s1          | User2
 dbadmin | USAGE                  |               | s1          | User3
(3 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
  </channel>
</rss>
