From 9975bb5071f1720e186b61a7678b551fac832098 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Fri, 9 Feb 2024 21:57:48 +0800 Subject: [PATCH] test: replication attribute --- test/expected/privileged_role.out | 25 +++++++++++++++++++++++++ test/sql/privileged_role.sql | 11 +++++++++++ 2 files changed, 36 insertions(+) diff --git a/test/expected/privileged_role.out b/test/expected/privileged_role.out index 4b927b3..6e72793 100644 --- a/test/expected/privileged_role.out +++ b/test/expected/privileged_role.out @@ -64,6 +64,31 @@ select rolbypassrls from pg_roles where rolname = 'r'; drop role r; \echo +-- can manage replication role attribute +create role r replication; +select rolreplication from pg_roles where rolname = 'r'; + rolreplication +---------------- + t +(1 row) + +alter role r noreplication; +select rolreplication from pg_roles where rolname = 'r'; + rolreplication +---------------- + f +(1 row) + +alter role r replication; +select rolreplication from pg_roles where rolname = 'r'; + rolreplication +---------------- + t +(1 row) + +drop role r; +\echo + -- can manage foreign data wrappers create extension postgres_fdw; create foreign data wrapper new_fdw diff --git a/test/sql/privileged_role.sql b/test/sql/privileged_role.sql index d0e2fc5..32c22fc 100644 --- a/test/sql/privileged_role.sql +++ b/test/sql/privileged_role.sql @@ -50,6 +50,17 @@ select rolbypassrls from pg_roles where rolname = 'r'; drop role r; \echo +-- can manage replication role attribute +create role r replication; +select rolreplication from pg_roles where rolname = 'r'; +alter role r noreplication; +select rolreplication from pg_roles where rolname = 'r'; +alter role r replication; +select rolreplication from pg_roles where rolname = 'r'; + +drop role r; +\echo + -- can manage foreign data wrappers create extension postgres_fdw; create foreign data wrapper new_fdw