Skip to content

Commit

Permalink
Merge pull request #18 from rvkulikov/feature-16
Browse files Browse the repository at this point in the history
feat(Common): Replaced pg_authid call with pg_roles (#16)
  • Loading branch information
rvkulikov authored Nov 14, 2023
2 parents 1ac47cb + f6b11e7 commit efe8daf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
26 changes: 14 additions & 12 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ begin
(aclexplode(COALESCE(pg_class.relacl, acldefault('r'::"char", pg_class.relowner)))).is_grantable AS is_grantable
FROM pg_class) c(oid, relname, relnamespace, relkind, relowner, grantor, grantee, prtype, grantable),
pg_namespace nc,
pg_authid u_grantor,
(SELECT pg_authid.oid,
pg_authid.rolname
FROM pg_authid
pg_roles u_grantor,
(SELECT pg_roles.oid,
pg_roles.rolname
FROM pg_roles
UNION ALL
SELECT 0::oid AS oid,
'PUBLIC'::name) grantee(oid, rolname)
Expand Down Expand Up @@ -199,10 +199,10 @@ begin
WHERE pr_a.attrelid = c.oid
AND (c.relkind = ANY (ARRAY ['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"]))) x,
pg_namespace nc,
pg_authid u_grantor,
(SELECT pg_authid.oid,
pg_authid.rolname
FROM pg_authid
pg_roles u_grantor,
(SELECT pg_roles.oid,
pg_roles.rolname
FROM pg_roles
UNION ALL
SELECT 0::oid AS oid,
'PUBLIC'::name) grantee(oid, rolname)
Expand Down

0 comments on commit efe8daf

Please sign in to comment.