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 1
1
SELECT
2
- c .oid AS table_id,
2
+ c .oid :: int8 AS table_id,
3
3
table_schema AS schema,
4
4
table_name AS table,
5
5
(c .oid || ' .' || ordinal_position) AS id,
Original file line number Diff line number Diff line change 1
1
SELECT
2
- c .oid AS table_id,
2
+ c .oid :: int8 AS table_id,
3
3
grantor,
4
4
grantee,
5
5
table_catalog AS catalog,
10
10
with_hierarchy :: boolean
11
11
FROM
12
12
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
14
14
AND table_name = c .relname
Original file line number Diff line number Diff line change 2
2
pol .oid as id,
3
3
n .nspname AS schema,
4
4
c .relname AS table,
5
- c .oid AS table_id,
5
+ c .oid :: int8 AS table_id,
6
6
pol .polname AS name,
7
7
CASE
8
8
WHEN pol .polpermissive THEN ' PERMISSIVE' :: text
9
9
ELSE ' RESTRICTIVE' :: text
10
10
END AS action,
11
11
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
+ )
24
27
END AS roles,
25
28
CASE
26
29
pol .polcmd
36
39
FROM
37
40
pg_policy pol
38
41
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 2
2
n .nspname AS schema,
3
3
c .oid :: regclass AS table_name,
4
4
a .attname AS name,
5
- c .oid AS table_id
5
+ c .oid :: int8 AS table_id
6
6
FROM
7
7
pg_index i,
8
8
pg_class c,
You can’t perform that action at this time.
0 commit comments