diff options
Diffstat (limited to 'src/backend/executor/nodeSubplan.c')
-rw-r--r-- | src/backend/executor/nodeSubplan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c index 4fcb66bbb03..0e12bb5afbd 100644 --- a/src/backend/executor/nodeSubplan.c +++ b/src/backend/executor/nodeSubplan.c @@ -432,7 +432,7 @@ buildSubPlanHash(SubPlanState *node, ExprContext *econtext) int ncols = list_length(subplan->paramIds); ExprContext *innerecontext = node->innerecontext; MemoryContext oldcontext; - int nbuckets; + long nbuckets; TupleTableSlot *slot; Assert(subplan->subLinkType == ANY_SUBLINK); @@ -458,7 +458,7 @@ buildSubPlanHash(SubPlanState *node, ExprContext *econtext) node->havehashrows = false; node->havenullrows = false; - nbuckets = (int) ceil(planstate->plan->plan_rows); + nbuckets = (long) Min(planstate->plan->plan_rows, (double) LONG_MAX); if (nbuckets < 1) nbuckets = 1; |