8000 fix: update pgbouncer.get_auth (INFRA-1530) by kangmingtay · Pull Request #1554 · supabase/postgres · GitHub
[go: up one dir, main page]

Skip to content

fix: update pgbouncer.get_auth (INFRA-1530) #1554

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

Merged
merged 7 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: add tests for pgbouncer
  • Loading branch information
kangmingtay committed Apr 21, 2025
commit 25d23b771eefbe1116a79e070f704413abe0b642
35 changes: 35 additions & 0 deletions nix/tests/expected/pgbouncer.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- pgbouncer schema owner
select
n.nspname as schema_name,
r.rolname as owner
from
pg_namespace n
join
pg_roles r on n.nspowner = r.oid
where
n.nspname = 'pgbouncer';
schema_name | owner
-------------+----------------
pgbouncer | supabase_admin
(1 row)

-- pgbouncer schema functions with owners
select
n.nspname as schema_name,
p.proname as function_name,
r.rolname as owner
from
pg_proc p
join
pg_namespace n on p.pronamespace = n.oid
join
pg_roles r on p.proowner = r.oid
where
n.nspname = 'pgbouncer'
order by
p.proname;
schema_name | function_name | owner
-------------+---------------+---------------------
pgbouncer | get_auth | supabase_admin
(1 row)

26 changes: 26 additions & 0 deletions nix/tests/sql/pgbouncer.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-- pgbouncer schema owner
select
n.nspname as schema_name,
r.rolname as owner
from
pg_namespace n
join
pg_roles r on n.nspowner = r.oid
where
n.nspname = 'pgbouncer';

-- pgbouncer schema functions with owners
select
n.nspname as schema_name,
p.proname as function_name,
r.rolname as owner
from
pg_proc p
join
pg_namespace n on p.pronamespace = n.oid
join
pg_roles r on p.proowner = r.oid
where
n.nspname = 'pgbouncer'
order by
p.proname;
Loading
0