From 09d16522c7dc7e3b3a2edb5e5c4dbd061f98ce97 Mon Sep 17 00:00:00 2001 From: Jason Teng Date: Thu, 28 Dec 2023 02:49:35 +0000 Subject: [PATCH] Fix ownership/permission_restrictions_from_pg expected test outputs for PG16 Signed-off-by: Jason Teng --- .../ownership_restrictions_from_pg.out | 14 +---------- ...mission_restrictions_from_pg-vu-verify.out | 1 + .../permission_restrictions_from_pg.out | 23 ++++++++++++++----- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/JDBC/expected/ownership_restrictions_from_pg.out b/test/JDBC/expected/ownership_restrictions_from_pg.out index cc2feaf5e3..26a3b25f6b 100644 --- a/test/JDBC/expected/ownership_restrictions_from_pg.out +++ b/test/JDBC/expected/ownership_restrictions_from_pg.out @@ -55,7 +55,7 @@ CREATE USER ownership_restrictions_from_pg_user_by_pg_login2; GO ~~ERROR (Code: 33557097)~~ -~~ERROR (Message: errstart was not called)~~ +~~ERROR (Message: role "ownership_restrictions_from_pg_user_by_pg_login2" does not exist)~~ @@ -449,8 +449,6 @@ GO Server SQLState: 42501)~~ --- tsql user=ownership_restrictions_from_pg_login1 password=12345678 - -- psql user=ownership_restrictions_from_pg_login1 password=12345678 ALTER ROLE ownership_restrictions_from_pg_login1 set babelfishpg_tsql.ownership_restrictions_from_pg_test_variable = 101; GO @@ -915,16 +913,6 @@ GO ~~START~~ bool t -t -~~END~~ - - -SELECT pg_terminate_backend(pid) FROM pg_stat_get_activity(NULL) -WHERE sys.suser_name(usesysid) = 'ownership_restrictions_from_pg_login2' AND backend_type = 'client backend' AND usesysid IS NOT NULL; -GO -~~START~~ -bool -t ~~END~~ diff --git a/test/JDBC/expected/permission_restrictions_from_pg-vu-verify.out b/test/JDBC/expected/permission_restrictions_from_pg-vu-verify.out index 070059141b..f70efb9898 100644 --- a/test/JDBC/expected/permission_restrictions_from_pg-vu-verify.out +++ b/test/JDBC/expected/permission_restrictions_from_pg-vu-verify.out @@ -5,6 +5,7 @@ go ~~ERROR (Code: 0)~~ ~~ERROR (Message: ERROR: permission denied to create role + Detail: Only roles with the CREATEROLE attribute may create roles. Server SQLState: 42501)~~ diff --git a/test/JDBC/expected/permission_restrictions_from_pg.out b/test/JDBC/expected/permission_restrictions_from_pg.out index 6cc4051bff..c166441a23 100644 --- a/test/JDBC/expected/permission_restrictions_from_pg.out +++ b/test/JDBC/expected/permission_restrictions_from_pg.out @@ -12,7 +12,8 @@ grant sysadmin to permission_restrictions_tsql_login; go ~~ERROR (Code: 0)~~ -~~ERROR (Message: ERROR: must have admin option on role "sysadmin" +~~ERROR (Message: ERROR: permission denied to grant role "sysadmin" + Detail: Only roles with the ADMIN option on role "sysadmin" may grant this role. Server SQLState: 42501)~~ @@ -22,6 +23,7 @@ go ~~ERROR (Code: 0)~~ ~~ERROR (Message: ERROR: permission denied to create role + Detail: Only roles with the CREATEROLE attribute may create roles. Server SQLState: 42501)~~ @@ -30,7 +32,8 @@ grant sysadmin to permission_restrictions_psql_user; go ~~ERROR (Code: 0)~~ -~~ERROR (Message: ERROR: must have admin option on role "sysadmin" +~~ERROR (Message: ERROR: permission denied to grant role "sysadmin" + Detail: Only roles with the ADMIN option on role "sysadmin" may grant this role. Server SQLState: 42501)~~ @@ -39,7 +42,8 @@ alter user permission_restrictions_psql_user with password '123' go ~~ERROR (Code: 0)~~ -~~ERROR (Message: ERROR: permission denied +~~ERROR (Message: ERROR: permission denied to alter role + Detail: To change another role's password, the current user must have the CREATEROLE attribute and the ADMIN option on the role. Server SQLState: 42501)~~ @@ -49,6 +53,7 @@ go ~~ERROR (Code: 0)~~ ~~ERROR (Message: ERROR: permission denied to drop role + Detail: Only roles with the CREATEROLE attribute and the ADMIN option on the target roles may drop roles. Server SQLState: 42501)~~ @@ -58,7 +63,8 @@ grant sysadmin to permission_restrictions_tsql_login; go ~~ERROR (Code: 0)~~ -~~ERROR (Message: ERROR: must have admin option on role "sysadmin" +~~ERROR (Message: ERROR: permission denied to grant role "sysadmin" + Detail: Only roles with the ADMIN option on role "sysadmin" may grant this role. Server SQLState: 42501)~~ @@ -68,6 +74,7 @@ go ~~ERROR (Code: 0)~~ ~~ERROR (Message: ERROR: permission denied to create role + Detail: Only roles with the CREATEROLE attribute may create roles. Server SQLState: 42501)~~ @@ -76,7 +83,8 @@ grant sysadmin to permission_restrictions_psql_user; go ~~ERROR (Code: 0)~~ -~~ERROR (Message: ERROR: must have admin option on role "sysadmin" +~~ERROR (Message: ERROR: permission denied to grant role "sysadmin" + Detail: Only roles with the ADMIN option on role "sysadmin" may grant this role. Server SQLState: 42501)~~ @@ -85,7 +93,8 @@ alter user permission_restrictions_tsql_login with password '123' go ~~ERROR (Code: 0)~~ -~~ERROR (Message: ERROR: permission denied +~~ERROR (Message: ERROR: permission denied to alter role + Detail: To change another role's password, the current user must have the CREATEROLE attribute and the ADMIN option on the role. Server SQLState: 42501)~~ @@ -95,6 +104,7 @@ go ~~ERROR (Code: 0)~~ ~~ERROR (Message: ERROR: permission denied to drop role + Detail: Only roles with the CREATEROLE attribute and the ADMIN option on the target roles may drop roles. Server SQLState: 42501)~~ @@ -135,6 +145,7 @@ go ~~ERROR (Code: 0)~~ ~~ERROR (Message: ERROR: permission denied to create role + Detail: Only roles with the CREATEROLE attribute may create roles. Server SQLState: 42501)~~