From 289121a452e3c255e4fd63dbb0252261605c2eaf Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Fri, 26 Dec 2014 14:18:09 -0300 Subject: [PATCH] Remove event trigger from object_address test It is causing trouble when run in parallel mode, because dropping the function other sessions are running concurrently causes them to fail due to inability to find the function. Per buildfarm, as noted by Tom Lane. --- src/test/regress/expected/object_address.out | 7 ++----- src/test/regress/sql/object_address.sql | 5 +---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/test/regress/expected/object_address.out b/src/test/regress/expected/object_address.out index 1528b29317..b760d357eb 100644 --- a/src/test/regress/expected/object_address.out +++ b/src/test/regress/expected/object_address.out @@ -28,8 +28,6 @@ CREATE DOMAIN addr_nsp.gendomain AS int4 CONSTRAINT domconstr CHECK (value > 0); CREATE FUNCTION addr_nsp.trig() RETURNS TRIGGER LANGUAGE plpgsql AS $$ BEGIN END; $$; CREATE TRIGGER t BEFORE INSERT ON addr_nsp.gentable FOR EACH ROW EXECUTE PROCEDURE addr_nsp.trig(); CREATE POLICY genpol ON addr_nsp.gentable; -CREATE FUNCTION addr_nsp.etrig() RETURNS EVENT_TRIGGER LANGUAGE plpgsql AS $$ BEGIN END; $$; -CREATE EVENT TRIGGER evttrig ON ddl_command_end EXECUTE PROCEDURE addr_nsp.etrig(); -- test some error cases SELECT pg_get_object_address('stone', '{}', '{}'); ERROR: unrecognized object type "stone" @@ -338,7 +336,7 @@ WITH objects (type, name, args) AS (VALUES ('server', '{addr_fserv}', '{}'), -- user mapping -- extension - ('event trigger', '{evttrig}', '{}'), + -- event trigger ('policy', '{addr_nsp, gentable, genpol}', '{}') ) SELECT (pg_identify_object(classid, objid, subobjid)).* @@ -377,12 +375,11 @@ ORDER BY classid, objid; operator family | pg_catalog | integer_ops | pg_catalog.integer_ops for btree policy | | | genpol on addr_nsp.gentable collation | pg_catalog | "default" | pg_catalog."default" - event trigger | | evttrig | evttrig text search dictionary | addr_nsp | addr_ts_dict | addr_nsp.addr_ts_dict text search parser | addr_nsp | addr_ts_prs | addr_nsp.addr_ts_prs text search configuration | addr_nsp | addr_ts_conf | addr_nsp.addr_ts_conf text search template | addr_nsp | addr_ts_temp | addr_nsp.addr_ts_temp -(36 rows) +(35 rows) --- --- Cleanup resources diff --git a/src/test/regress/sql/object_address.sql b/src/test/regress/sql/object_address.sql index 6cba092361..e5209b9e44 100644 --- a/src/test/regress/sql/object_address.sql +++ b/src/test/regress/sql/object_address.sql @@ -33,9 +33,6 @@ CREATE FUNCTION addr_nsp.trig() RETURNS TRIGGER LANGUAGE plpgsql AS $$ BEGIN END CREATE TRIGGER t BEFORE INSERT ON addr_nsp.gentable FOR EACH ROW EXECUTE PROCEDURE addr_nsp.trig(); CREATE POLICY genpol ON addr_nsp.gentable; -CREATE FUNCTION addr_nsp.etrig() RETURNS EVENT_TRIGGER LANGUAGE plpgsql AS $$ BEGIN END; $$; -CREATE EVENT TRIGGER evttrig ON ddl_command_end EXECUTE PROCEDURE addr_nsp.etrig(); - -- test some error cases SELECT pg_get_object_address('stone', '{}', '{}'); SELECT pg_get_object_address('table', '{}', '{}'); @@ -159,7 +156,7 @@ WITH objects (type, name, args) AS (VALUES ('server', '{addr_fserv}', '{}'), -- user mapping -- extension - ('event trigger', '{evttrig}', '{}'), + -- event trigger ('policy', '{addr_nsp, gentable, genpol}', '{}') ) SELECT (pg_identify_object(classid, objid, subobjid)).* -- 2.40.0