Skip to content

Commit 47e9cd0

Browse files
committed
tiny optimization in handle_modification_query()
1 parent 9905ac6 commit 47e9cd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/planner_tree_modification.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ handle_modification_query(Query *parse, ParamListInfo params)
279279
if (!expr) return;
280280

281281
/* Check if we can replace PARAMs with CONSTs */
282-
if (clause_contains_params((Node *) expr) && params)
282+
if (params && clause_contains_params((Node *) expr))
283283
expr = (Expr *) eval_extern_params_mutator((Node *) expr, params);
284284

285285
/* Prepare partitioning expression */
@@ -293,7 +293,7 @@ handle_modification_query(Query *parse, ParamListInfo params)
293293

294294
/*
295295
* If only one partition is affected,
296-
* substitute parent table with partition.
296+
* substitute parent table with the partition.
297297
*/
298298
if (irange_list_length(ranges) == 1)
299299
{

0 commit comments

Comments
 (0)