Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5afbc30

Browse files
committed
minor fixes (free tuples etc)
1 parent 215aa2e commit 5afbc30

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/init.c

+1
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,7 @@ pathman_config_invalidate_parsed_expression(Oid relid)
706706
/* Form new tuple and perform an update */
707707
new_htup = heap_form_tuple(RelationGetDescr(rel), values, nulls);
708708
CatalogTupleUpdate(rel, &iptr, new_htup);
709+
heap_freetuple(new_htup);
709710

710711
heap_close(rel, RowExclusiveLock);
711712
}

src/partition_creation.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,7 @@ create_single_partition_internal(Oid parent_relid,
681681
*parent_nsp_name;
682682

683683
/* Elements of the "CREATE TABLE" query tree */
684-
RangeVar *parent_rv,
685-
*newrel_rv = copyObject(partition_rv);
684+
RangeVar *parent_rv;
686685
TableLikeClause like_clause;
687686
CreateStmt create_stmt;
688687
List *create_stmts;
@@ -745,7 +744,7 @@ create_single_partition_internal(Oid parent_relid,
745744

746745
/* Initialize CreateStmt structure */
747746
NodeSetTag(&create_stmt, T_CreateStmt);
748-
create_stmt.relation = newrel_rv;
747+
create_stmt.relation = copyObject(partition_rv);
749748
create_stmt.tableElts = list_make1(copyObject(&like_clause));
750749
create_stmt.inhRelations = list_make1(copyObject(parent_rv));
751750
create_stmt.ofTypename = NULL;

0 commit comments

Comments
 (0)