Skip to content

Commit a1580d5

Browse files
committed
on_partitions_removed fix
1 parent d2559df commit a1580d5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

init.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,8 @@ remove_relation_info(Oid relid)
488488
free_dsm_array(&rangerel->ranges);
489489
free_dsm_array(&prel->children);
490490
hash_search(range_restrictions, (const void *) &key, HASH_REMOVE, NULL);
491-
hash_search(relations, (const void *) &key, HASH_REMOVE, NULL);
492491
break;
493492
}
494493
prel->children_count = 0;
495-
hash_search(relations, (const void *) &relid, HASH_REMOVE, 0);
494+
hash_search(relations, (const void *) &key, HASH_REMOVE, 0);
496495
}

init.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ CREATE OR REPLACE FUNCTION @extschema@.disable_partitioning(IN relation TEXT)
8282
RETURNS VOID AS
8383
$$
8484
BEGIN
85+
relation := @extschema@.validate_relname(relation);
86+
8587
DELETE FROM @extschema@.pathman_config WHERE relname = relation;
8688
EXECUTE format('DROP FUNCTION IF EXISTS %s_insert_trigger_func() CASCADE', relation);
8789

0 commit comments

Comments
 (0)