aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/modules/test_oat_hooks/expected/test_oat_hooks.out13
-rw-r--r--src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql5
-rw-r--r--src/test/modules/test_oat_hooks/test_oat_hooks.c10
3 files changed, 21 insertions, 7 deletions
diff --git a/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out b/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
index c9b6eb20d37..30828a7da39 100644
--- a/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
+++ b/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
@@ -83,6 +83,11 @@ NOTICE: in object access: superuser finished create (subId=0x0) [internal]
NOTICE: in object access: superuser attempting create (subId=0x0) [internal]
NOTICE: in object access: superuser finished create (subId=0x0) [internal]
NOTICE: in process utility: superuser finished CreateStmt
+CREATE INDEX regress_test_table_t_idx ON regress_test_table (t);
+NOTICE: in process utility: superuser attempting IndexStmt
+NOTICE: in object access: superuser attempting create (subId=0x0) [explicit]
+NOTICE: in object access: superuser finished create (subId=0x0) [explicit]
+NOTICE: in process utility: superuser finished IndexStmt
GRANT SELECT ON Table regress_test_table TO public;
NOTICE: in process utility: superuser attempting GrantStmt
NOTICE: in process utility: superuser finished GrantStmt
@@ -280,12 +285,18 @@ NOTICE: in process utility: superuser attempting alter system
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x2000, alter system) [work_mem]
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x2000, alter system) [work_mem]
NOTICE: in process utility: superuser finished alter system
--- Clean up
+-- try labelled drops
RESET SESSION AUTHORIZATION;
NOTICE: in process utility: superuser attempting set
NOTICE: in object_access_hook_str: superuser attempting alter (subId=0x1000, set) [session_authorization]
NOTICE: in object_access_hook_str: superuser finished alter (subId=0x1000, set) [session_authorization]
NOTICE: in process utility: superuser finished set
+DROP INDEX CONCURRENTLY regress_test_table_t_idx;
+NOTICE: in process utility: superuser attempting DropStmt
+NOTICE: in object access: superuser attempting drop (subId=0x0) [concurrent drop,]
+NOTICE: in object access: superuser finished drop (subId=0x0) [concurrent drop,]
+NOTICE: in process utility: superuser finished DropStmt
+-- Clean up
SET test_oat_hooks.audit = false;
NOTICE: in process utility: superuser attempting set
DROP ROLE regress_role_joe; -- fails
diff --git a/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql b/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql
index d692f52d922..d0cca8c44eb 100644
--- a/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql
+++ b/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql
@@ -38,6 +38,7 @@ REVOKE ALL ON PARAMETER "none.such" FROM PUBLIC;
-- Create objects for use in the test
CREATE USER regress_test_user;
CREATE TABLE regress_test_table (t text);
+CREATE INDEX regress_test_table_t_idx ON regress_test_table (t);
GRANT SELECT ON Table regress_test_table TO public;
CREATE FUNCTION regress_test_func (t text) RETURNS text AS $$
SELECT $1;
@@ -88,9 +89,11 @@ RESET work_mem;
ALTER SYSTEM SET work_mem = 8192;
ALTER SYSTEM RESET work_mem;
--- Clean up
+-- try labelled drops
RESET SESSION AUTHORIZATION;
+DROP INDEX CONCURRENTLY regress_test_table_t_idx;
+-- Clean up
SET test_oat_hooks.audit = false;
DROP ROLE regress_role_joe; -- fails
REVOKE ALL PRIVILEGES ON PARAMETER
diff --git a/src/test/modules/test_oat_hooks/test_oat_hooks.c b/src/test/modules/test_oat_hooks/test_oat_hooks.c
index 1f40d632e07..900d597f5dd 100644
--- a/src/test/modules/test_oat_hooks/test_oat_hooks.c
+++ b/src/test/modules/test_oat_hooks/test_oat_hooks.c
@@ -1795,15 +1795,15 @@ accesstype_arg_to_string(ObjectAccessType access, void *arg)
return psprintf("%s%s%s%s%s%s",
((drop_arg->dropflags & PERFORM_DELETION_INTERNAL)
? "internal action," : ""),
- ((drop_arg->dropflags & PERFORM_DELETION_INTERNAL)
+ ((drop_arg->dropflags & PERFORM_DELETION_CONCURRENTLY)
? "concurrent drop," : ""),
- ((drop_arg->dropflags & PERFORM_DELETION_INTERNAL)
+ ((drop_arg->dropflags & PERFORM_DELETION_QUIETLY)
? "suppress notices," : ""),
- ((drop_arg->dropflags & PERFORM_DELETION_INTERNAL)
+ ((drop_arg->dropflags & PERFORM_DELETION_SKIP_ORIGINAL)
? "keep original object," : ""),
- ((drop_arg->dropflags & PERFORM_DELETION_INTERNAL)
+ ((drop_arg->dropflags & PERFORM_DELETION_SKIP_EXTENSIONS)
? "keep extensions," : ""),
- ((drop_arg->dropflags & PERFORM_DELETION_INTERNAL)
+ ((drop_arg->dropflags & PERFORM_DELETION_CONCURRENT_LOCK)
? "normal concurrent drop," : ""));
}
break;