Skip to content

Commit b7ee080

Browse files
committed
fix function forget_constraint_of_partition()
1 parent 36ac4bf commit b7ee080

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/relation_info.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -702,10 +702,19 @@ try_perform_parent_refresh(Oid parent)
702702
void
703703
forget_constraint_of_partition(Oid partition)
704704
{
705-
pathman_cache_search_relid(constraint_cache,
706-
partition,
707-
HASH_REMOVE,
708-
NULL);
705+
PartConstraintInfo *pcon = pathman_cache_search_relid(constraint_cache,
706+
partition,
707+
HASH_FIND,
708+
NULL);
709+
if (pcon)
710+
{
711+
/* FIXME: implement pfree(constraint) logc */
712+
713+
pathman_cache_search_relid(constraint_cache,
714+
partition,
715+
HASH_REMOVE,
716+
NULL);
717+
}
709718
}
710719

711720
/* Return partition's constraint as expression tree */

0 commit comments

Comments
 (0)