File tree Expand file tree Collapse file tree 4 files changed +21
-18
lines changed Expand file tree Collapse file tree 4 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 11SELECT 
2-   c .oid  AS  table_id,
2+   c .oid  :: int8  AS  table_id,
33  table_schema AS  schema,
44  table_name AS  table,
55  (c .oid  ||  ' .' ||  ordinal_position) AS  id,
Original file line number Diff line number Diff line change 11SELECT 
2-   c .oid  AS  table_id,
2+   c .oid  :: int8  AS  table_id,
33  grantor,
44  grantee,
55  table_catalog AS  catalog,
1010  with_hierarchy :: boolean 
1111FROM 
1212  information_schema .role_table_grants 
13-   JOIN  pg_class c ON  quote_ident(table_schema):: regnamespace =  c .relnamespace 
13+   JOIN  pg_class c ON  quote_ident(table_schema) ::  regnamespace =  c .relnamespace 
1414  AND  table_name =  c .relname 
Original file line number Diff line number Diff line change 22  pol .oid  as  id,
33  n .nspname  AS  schema,
44  c .relname  AS  table,
5-   c .oid  AS  table_id,
5+   c .oid  :: int8  AS  table_id,
66  pol .polname  AS  name,
77  CASE
88    WHEN pol .polpermissive  THEN ' PERMISSIVE' text 
99    ELSE ' RESTRICTIVE' text 
1010  END AS  action,
1111  CASE
12-     WHEN pol .polroles  =  ' {0}' oid  [] 
13-     THEN array_to_json(string_to_array(' public' text , ' ' text ) :: name [])
14-     ELSE array_to_json(ARRAY(
15-       SELECT 
16-         pg_authid .rolname 
17-       FROM 
18-         pg_authid
19-       WHERE 
20-         pg_authid .oid  =  ANY (pol .polroles )
21-       ORDER BY 
22-         pg_authid .rolname 
23-     ))
12+     WHEN pol .polroles  =  ' {0}' oid  [] THEN array_to_json(
13+       string_to_array(' public' text , ' ' text ) :: name []
14+     )
15+     ELSE array_to_json(
16+       ARRAY(
17+         SELECT 
18+           pg_authid .rolname 
19+         FROM 
20+           pg_authid
21+         WHERE 
22+           pg_authid .oid  =  ANY (pol .polroles )
23+         ORDER BY 
24+           pg_authid .rolname 
25+       )
26+     )
2427  END AS  roles,
2528  CASE
2629    pol .polcmd 
3639FROM 
3740  pg_policy pol
3841  JOIN  pg_class c ON  c .oid  =  pol .polrelid 
39-   LEFT JOIN  pg_namespace n ON  n .oid  =  c .relnamespace 
42+   LEFT JOIN  pg_namespace n ON  n .oid  =  c .relnamespace 
Original file line number Diff line number Diff line change 22  n .nspname  AS  schema,
33  c .oid  :: regclass AS  table_name,
44  a .attname  AS  name,
5-   c .oid  AS  table_id
5+   c .oid  :: int8  AS  table_id
66FROM 
77  pg_index i,
88  pg_class c,
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments