summaryrefslogtreecommitdiff
path: root/src/test/modules/test_oat_hooks/sql
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2022-07-13 11:57:25 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2022-07-13 12:58:56 +0200
commitf16180216d0a6dcefd76fef4121227b63df46681 (patch)
tree030311b9b8c4fd5e641431a7c43884ef1e6717e2 /src/test/modules/test_oat_hooks/sql
parent784cedda0604ee4ac731fd0b00cd8b27e78c02d3 (diff)
Fix flag tests in src/test/modules/test_oat_hooks
In what must have been a copy'n paste mistake, all the flag tests use the same flag rather than a different flag each. The bug is not suprising, considering that it's dead code; add a minimal, testimonial line to cover it. This is all pretty inconsequential, because this is just example code, but it had better be correct. Discussion: https://postgr.es/m/20220712152059.fwli2majwgzdmh4r@alvherre.pgsql
Diffstat (limited to 'src/test/modules/test_oat_hooks/sql')
-rw-r--r--src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql5
1 files changed, 4 insertions, 1 deletions
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