Skip to content

Commit c453ce4

Browse files
committed
fixes for migration script (pathman_config_params_trigger_func() & invalidate_relcache())
1 parent 88d3e4d commit c453ce4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Diff for: pg_pathman--1.1--1.2.sql

+16
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ DROP FUNCTION @[email protected]_sequence_name(TEXT, TEXT);
2323
DROP FUNCTION @[email protected]_single_range_partition(REGCLASS, ANYELEMENT, ANYELEMENT, TEXT, TEXT);
2424
DROP FUNCTION @[email protected]_overlap(REGCLASS, ANYELEMENT, ANYELEMENT);
2525
DROP FUNCTION @[email protected]_range_partition(REGCLASS, ANYELEMENT, TEXT, OUT ANYARRAY);
26+
DROP FUNCTION @[email protected]_relcache(OID);
27+
28+
/* drop trigger and its function (PATHMAN_CONFIG_PARAMS) */
29+
DROP TRIGGER pathman_config_params_trigger;
30+
DROP FUNCTION @[email protected]_config_params_trigger_func();
31+
2632

2733
/* ------------------------------------------------------------------------
2834
* Alter functions' modifiers
@@ -1265,6 +1271,16 @@ RETURNS VOID AS 'pg_pathman', 'check_range_available_pl'
12651271
LANGUAGE C;
12661272

12671273

1274+
/* Finally create function and trigger (PATHMAN_CONFIG_PARAMS) */
1275+
CREATE OR REPLACE FUNCTION @[email protected]_config_params_trigger_func()
1276+
RETURNS TRIGGER AS 'pg_pathman', 'pathman_config_params_trigger_func'
1277+
LANGUAGE C;
1278+
1279+
CREATE TRIGGER pathman_config_params_trigger
1280+
BEFORE INSERT OR UPDATE OR DELETE ON @[email protected]_config_params
1281+
FOR EACH ROW EXECUTE PROCEDURE @[email protected]_config_params_trigger_func();
1282+
1283+
12681284
/* ------------------------------------------------------------------------
12691285
* Alter tables
12701286
* ----------------------------------------------------------------------*/

0 commit comments

Comments
 (0)