Document has_type_privilege().
authorTom Lane
Mon, 26 Sep 2016 15:50:35 +0000 (11:50 -0400)
committerTom Lane
Mon, 26 Sep 2016 15:50:35 +0000 (11:50 -0400)
Evidently an oversight in commit 729205571.  Back-patch to 9.2 where
privileges for types were introduced.

Report: <20160922173517[email protected]>

doc/src/sgml/func.sgml

index 1355ecf728db3610e2c011381797d30564802586..94f10881b20d743bbf635f00716ce45b0a98d227 100644 (file)
@@ -15293,6 +15293,21 @@ SET search_path TO schema schema, ..
        boolean
        does current user have privilege for tablespace
       
+      
+       has_type_privilege(user,
+                                  type,
+                                  privilege)
+       
+       boolean
+       does user have privilege for type
+      
+      
+       has_type_privilege(type,
+                                  privilege)
+       
+       boolean
+       does current user have privilege for type
+      
       
        pg_has_role(user,
                                   role,
@@ -15351,6 +15366,9 @@ SET search_path TO schema schema, ..
    
     has_tablespace_privilege
    
+   
+    has_type_privilege
+   
    
     pg_has_role
    
@@ -15505,6 +15523,18 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute');
     CREATE.
    
 
+   
+    has_type_privilege checks whether a user
+    can access a type in a particular way.
+    Its argument possibilities
+    are analogous to has_table_privilege.
+    When specifying a type by a text string rather than by OID,
+    the allowed input is the same as for the regtype data type
+    (see ).
+    The desired access privilege type must evaluate to
+    USAGE.
+   
+
    
     pg_has_role checks whether a user
     can access a role in a particular way.