diff --git a/src/postgres/src/test/regress/expected/yb_profile.out b/src/postgres/src/test/regress/expected/yb_profile.out index dfbbbb5b967d..a4d0d70d23db 100644 --- a/src/postgres/src/test/regress/expected/yb_profile.out +++ b/src/postgres/src/test/regress/expected/yb_profile.out @@ -60,6 +60,11 @@ SELECT prfname, prffailedloginattempts FROM pg_catalog.pg_yb_profile ORDER BY OI -- Fail because it is a duplicate name CREATE PROFILE test_profile LIMIT FAILED_LOGIN_ATTEMPTS 4; ERROR: profile "test_profile" already exists +-- Fail because -ve numbers are not allowed +CREATE PROFILE test_profile LIMIT FAILED_LOGIN_ATTEMPTS -1; +ERROR: syntax error at or near "-" +LINE 1: CREATE PROFILE test_profile LIMIT FAILED_LOGIN_ATTEMPTS -1; + ^ -- -- DROP PROFILE -- diff --git a/src/postgres/src/test/regress/expected/yb_profile_permissions.out b/src/postgres/src/test/regress/expected/yb_profile_permissions.out index 2a03a76301dc..dd88f413f349 100644 --- a/src/postgres/src/test/regress/expected/yb_profile_permissions.out +++ b/src/postgres/src/test/regress/expected/yb_profile_permissions.out @@ -46,7 +46,7 @@ DROP PROFILE existing_profile; -- Recreate profile for next test \c yugabyte yugabyte CREATE PROFILE existing_profile LIMIT FAILED_LOGIN_ATTEMPTS 3; --- user_3 can execute these commands as it is a yb_superuser. +-- user_3 can execute these commands as it is a yb_super_admin. \c yugabyte user_3 CREATE PROFILE test_profile_3 LIMIT FAILED_LOGIN_ATTEMPTS 3; ALTER USER restricted_user PROFILE test_profile_3; diff --git a/src/postgres/src/test/regress/expected/yb_role_profile.out b/src/postgres/src/test/regress/expected/yb_role_profile.out index ad7f1de87c85..0710815f11d7 100644 --- a/src/postgres/src/test/regress/expected/yb_role_profile.out +++ b/src/postgres/src/test/regress/expected/yb_role_profile.out @@ -8,13 +8,13 @@ Table "pg_catalog.pg_yb_role_profile" Column | Type | Collation | Nullable | Default ------------------------+---------+-----------+----------+--------- - rolisenabled | boolean | | not null | rolid | oid | | not null | prfid | oid | | not null | + rolisenabled | boolean | | not null | rolfailedloginattempts | integer | | not null | - rollockedat | bigint | | not null | + rollockedat | integer | | not null | Indexes: - "pg_yb_role_profile_oid_index" PRIMARY KEY, lsm (rolid ASC), tablespace "pg_global" + "pg_yb_role_profile_oid_index" PRIMARY KEY, lsm (oid ASC), tablespace "pg_global" Tablespace: "pg_global" SELECT oid, relname, reltype, relnatts FROM pg_class WHERE relname IN ('pg_yb_role_profile', 'pg_yb_role_profile_oid_index'); @@ -237,8 +237,8 @@ select count(*) from pg_yb_role_profile; (1 row) select * from pg_yb_role_profile; - rolisenabled | rolid | prfid | rolfailedloginattempts | rollockedat ---------------+-------+-------+------------------------+------------- + rolid | prfid | rolisenabled | rolfailedloginattempts | rollockedat +-------+-------+--------------+------------------------+------------- (0 rows) DROP PROFILE test_profile; diff --git a/src/postgres/src/test/regress/sql/yb_profile.sql b/src/postgres/src/test/regress/sql/yb_profile.sql index 3266416a5c8b..ffbd2e4e8353 100644 --- a/src/postgres/src/test/regress/sql/yb_profile.sql +++ b/src/postgres/src/test/regress/sql/yb_profile.sql @@ -22,9 +22,11 @@ CREATE PROFILE test_profile LIMIT FAILED_LOGIN_ATTEMPTS 3; SELECT prfname, prffailedloginattempts FROM pg_catalog.pg_yb_profile ORDER BY OID; -- Fail because it is a duplicate name - CREATE PROFILE test_profile LIMIT FAILED_LOGIN_ATTEMPTS 4; +-- Fail because -ve numbers are not allowed +CREATE PROFILE test_profile LIMIT FAILED_LOGIN_ATTEMPTS -1; + -- -- DROP PROFILE -- diff --git a/src/postgres/src/test/regress/sql/yb_profile_permissions.sql b/src/postgres/src/test/regress/sql/yb_profile_permissions.sql index 17548ea29ca5..eafd69c41b18 100644 --- a/src/postgres/src/test/regress/sql/yb_profile_permissions.sql +++ b/src/postgres/src/test/regress/sql/yb_profile_permissions.sql @@ -39,7 +39,7 @@ DROP PROFILE existing_profile; \c yugabyte yugabyte CREATE PROFILE existing_profile LIMIT FAILED_LOGIN_ATTEMPTS 3; --- user_3 can execute these commands as it is a yb_superuser. +-- user_3 can execute these commands as it is a yb_super_admin. \c yugabyte user_3 CREATE PROFILE test_profile_3 LIMIT FAILED_LOGIN_ATTEMPTS 3;