From 4870feed0bb0695bf0ad3b34620412c3ab33cba6 Mon Sep 17 00:00:00 2001 From: kankankanp Date: Sat, 24 Oct 2026 16:48:37 +0900 Subject: [PATCH] test: show null password in pgbouncer regression output --- nix/tests/expected/pgbouncer.out | 10 ++++++---- nix/tests/sql/pgbouncer.sql | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/nix/tests/expected/pgbouncer.out b/nix/tests/expected/pgbouncer.out index 196e8cd5d9..3385e69363 100644 --- a/nix/tests/expected/pgbouncer.out +++ b/nix/tests/expected/pgbouncer.out @@ -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 '' +select * from pgbouncer.get_auth('test_expired_user_password'); + username | password +----------------------------+---------- + test_expired_user_password | (1 row) select pgbouncer.get_auth('test_valid_user_password'); diff --git a/nix/tests/sql/pgbouncer.sql b/nix/tests/sql/pgbouncer.sql index e9beb3e78b..65580fb9cf 100644 --- a/nix/tests/sql/pgbouncer.sql +++ b/nix/tests/sql/pgbouncer.sql @@ -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 '' +select * from pgbouncer.get_auth('test_expired_user_password'); select pgbouncer.get_auth('test_valid_user_password');