postgres.git / summary / log / commit / refs
commit d3c25ca1bf59bc4ccf589942f94bc5b945b1f46f
Author: Michael Paquier <michael@paquier.xyz>
Date: Thu Aug 17 01:51:26 2023 +0000
First released in: 17.0
sepgsql: Adjust regression expected output
Oversight in 352ea3a, where support for these subcommands has been
added.
Per buildfarm member rhinoceros.
contrib/sepgsql/expected/alter.out | 18 ++++++++++++------
contrib/sepgsql/sql/alter.sql | 12 ++++++------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/contrib/sepgsql/expected/alter.out b/contrib/sepgsql/expected/alter.out
index c604cc77682..ae435375052 100644
--- a/contrib/sepgsql/expected/alter.out
+++ b/contrib/sepgsql/expected/alter.out
@@ -207,11 +207,15 @@ LOG: SELinux: allowed { execute } scontext=unconfined_u:unconfined_r:sepgsql_re
ALTER TABLE regtest_table DROP CONSTRAINT test_ck; -- not supported
CREATE TRIGGER regtest_test_trig BEFORE UPDATE ON regtest_table
FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger();
-ALTER TABLE regtest_table DISABLE TRIGGER regtest_test_trig; -- not supported
-ALTER TABLE regtest_table ENABLE TRIGGER regtest_test_trig; -- not supported
+ALTER TABLE regtest_table DISABLE TRIGGER regtest_test_trig;
+LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema_2.regtest_table" permissive=0
+ALTER TABLE regtest_table ENABLE TRIGGER regtest_test_trig;
+LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema_2.regtest_table" permissive=0
CREATE RULE regtest_test_rule AS ON INSERT TO regtest_table_3 DO ALSO NOTHING;
-ALTER TABLE regtest_table_3 DISABLE RULE regtest_test_rule; -- not supported
-ALTER TABLE regtest_table_3 ENABLE RULE regtest_test_rule; -- not supported
+ALTER TABLE regtest_table_3 DISABLE RULE regtest_test_rule;
+LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema.regtest_table_3" permissive=0
+ALTER TABLE regtest_table_3 ENABLE RULE regtest_test_rule;
+LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema.regtest_table_3" permissive=0
ALTER TABLE regtest_table SET (fillfactor = 75);
LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema_2.regtest_table" permissive=0
ALTER TABLE regtest_table RESET (fillfactor);
@@ -281,8 +285,10 @@ LOG: SELinux: allowed { execute } scontext=unconfined_u:unconfined_r:sepgsql_re
ALTER TABLE regtest_table_part DROP CONSTRAINT test_ck; -- not supported by sepgsql
CREATE TRIGGER regtest_part_test_trig BEFORE UPDATE ON regtest_table_part
FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger();
-ALTER TABLE regtest_table_part DISABLE TRIGGER regtest_part_test_trig; -- not supported by sepgsql
-ALTER TABLE regtest_table_part ENABLE TRIGGER regtest_part_test_trig; -- not supported by sepgsql
+ALTER TABLE regtest_table_part DISABLE TRIGGER regtest_part_test_trig;
+LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema_2.regtest_table_part" permissive=0
+ALTER TABLE regtest_table_part ENABLE TRIGGER regtest_part_test_trig;
+LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema_2.regtest_table_part" permissive=0
ALTER TABLE regtest_table_part SET (fillfactor = 75);
LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema_2.regtest_table_part" permissive=0
ALTER TABLE regtest_table_part RESET (fillfactor);
diff --git a/contrib/sepgsql/sql/alter.sql b/contrib/sepgsql/sql/alter.sql
index f1144492329..fd711f3f7ab 100644
--- a/contrib/sepgsql/sql/alter.sql
+++ b/contrib/sepgsql/sql/alter.sql
@@ -127,12 +127,12 @@ ALTER TABLE regtest_table DROP CONSTRAINT test_ck; -- not supported
CREATE TRIGGER regtest_test_trig BEFORE UPDATE ON regtest_table
FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger();
-ALTER TABLE regtest_table DISABLE TRIGGER regtest_test_trig; -- not supported
-ALTER TABLE regtest_table ENABLE TRIGGER regtest_test_trig; -- not supported
+ALTER TABLE regtest_table DISABLE TRIGGER regtest_test_trig;
+ALTER TABLE regtest_table ENABLE TRIGGER regtest_test_trig;
CREATE RULE regtest_test_rule AS ON INSERT TO regtest_table_3 DO ALSO NOTHING;
-ALTER TABLE regtest_table_3 DISABLE RULE regtest_test_rule; -- not supported
-ALTER TABLE regtest_table_3 ENABLE RULE regtest_test_rule; -- not supported
+ALTER TABLE regtest_table_3 DISABLE RULE regtest_test_rule;
+ALTER TABLE regtest_table_3 ENABLE RULE regtest_test_rule;
ALTER TABLE regtest_table SET (fillfactor = 75);
ALTER TABLE regtest_table RESET (fillfactor);
@@ -173,8 +173,8 @@ ALTER TABLE regtest_table_part DROP CONSTRAINT test_ck; -- not supported by
CREATE TRIGGER regtest_part_test_trig BEFORE UPDATE ON regtest_table_part
FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger();
-ALTER TABLE regtest_table_part DISABLE TRIGGER regtest_part_test_trig; -- not supported by sepgsql
-ALTER TABLE regtest_table_part ENABLE TRIGGER regtest_part_test_trig; -- not supported by sepgsql
+ALTER TABLE regtest_table_part DISABLE TRIGGER regtest_part_test_trig;
+ALTER TABLE regtest_table_part ENABLE TRIGGER regtest_part_test_trig;
ALTER TABLE regtest_table_part SET (fillfactor = 75);
ALTER TABLE regtest_table_part RESET (fillfactor);
[parent: 352ea3acf8a2]