Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions nix/tests/expected/pgbouncer.out
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ create role test_expired_user_password with login password 'expired_password' va
create role test_valid_user_password with login password 'valid_password' valid until '2100-01-01 00:00:00+00';
-- Update the pg_authid catalog directly to replace with a known SCRAM hash
update pg_authid set rolpassword = 'SCRAM-SHA-256$4096:testsaltbase64$storedkeybase64$serverkeybase64' where rolname = 'test_valid_user_password';
select pgbouncer.get_auth('test_expired_user_password');
get_auth
-------------------------------
(test_expired_user_password,)
-- Expand the result so psql can display a null password explicitly.
\pset null '<null>'
select * from pgbouncer.get_auth('test_expired_user_password');
username | password
----------------------------+----------
test_expired_user_password | <null>
(1 row)

select pgbouncer.get_auth('test_valid_user_password');
Expand Down
4 changes: 3 additions & 1 deletion nix/tests/sql/pgbouncer.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ create role test_valid_user_password with login password 'valid_password' valid
-- Update the pg_authid catalog directly to replace with a known SCRAM hash
update pg_authid set rolpassword = 'SCRAM-SHA-256$4096:testsaltbase64$storedkeybase64$serverkeybase64' where rolname = 'test_valid_user_password';

select pgbouncer.get_auth('test_expired_user_password');
-- Expand the result so psql can display a null password explicitly.
\pset null '<null>'
select * from pgbouncer.get_auth('test_expired_user_password');

select pgbouncer.get_auth('test_valid_user_password');

Expand Down
Loading