Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pg_authid view #6600

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .unreleased/pg_6600
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Implements: #6600 Add timescaledb_information.pg_authid to access non-superuser passwords
5 changes: 5 additions & 0 deletions sql/views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,9 @@ WHERE
'MEMBER') IS TRUE
OR pg_catalog.pg_has_role(current_user, owner, 'MEMBER') IS TRUE;

-- View for viewing non-superuser passwords
CREATE OR REPLACE VIEW timescaledb_information.pg_authid
WITH (security_barrier = true) AS
SELECT * FROM pg_catalog.pg_authid WHERE rolsuper = 'false';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to make this something fancier, e.g. to exclude replication users, roles with expired passwords, etc.


GRANT SELECT ON ALL TABLES IN SCHEMA timescaledb_information TO PUBLIC;