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

pg_pathman--1.1--1.2.sql

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ DROP FUNCTION @extschema@.get_sequence_name(TEXT, TEXT);
2323
DROP FUNCTION @extschema@.create_single_range_partition(REGCLASS, ANYELEMENT, ANYELEMENT, TEXT, TEXT);
2424
DROP FUNCTION @extschema@.check_overlap(REGCLASS, ANYELEMENT, ANYELEMENT);
2525
DROP FUNCTION @extschema@.split_range_partition(REGCLASS, ANYELEMENT, TEXT, OUT ANYARRAY);
26+
DROP FUNCTION @extschema@.invalidate_relcache(OID);
27+
28+
/* drop trigger and its function (PATHMAN_CONFIG_PARAMS) */
29+
DROP TRIGGER pathman_config_params_trigger;
30+
DROP FUNCTION @extschema@.pathman_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 @extschema@.pathman_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 @extschema@.pathman_config_params
1281+
FOR EACH ROW EXECUTE PROCEDURE @extschema@.pathman_config_params_trigger_func();
1282+
1283+
12681284
/* ------------------------------------------------------------------------
12691285
* Alter tables
12701286
* ----------------------------------------------------------------------*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy