Skip to content

Commit 5f6d07d

Browse files
author
Vadim Geshel
authored
Use pg_roles instead of pg_authid
pg_authid is not accessible, for example, on AWS RDS Postgres even when using the master user. Postgres documentation [recommends](https://www.postgresql.org/docs/9.6/catalog-pg-authid.html) using pg_roles.
1 parent 69514b3 commit 5f6d07d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

owner.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SELECT n.nspname AS schema_name
3232
WHEN c.relkind = 'v' THEN 'VIEW'
3333
ELSE c.relkind::varchar END AS type
3434
FROM pg_class AS c
35-
INNER JOIN pg_authid AS a ON (a.oid = c.relowner)
35+
INNER JOIN pg_roles AS a ON (a.oid = c.relowner)
3636
INNER JOIN pg_namespace AS n ON (n.oid = c.relnamespace)
3737
WHERE c.relkind IN ('r', 'S', 'v')
3838
{{if eq $.DbSchema "*" }}

0 commit comments

Comments
 (0)