Skip to content

Commit 8f17828

Browse files
committed
Port #12 to PG11
1 parent 19516af commit 8f17828

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

CHANGELOG.carto.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
11.1+carto-1
2+
Release date: XXXX-XX-XX
3+
4+
Changes:
5+
6+
- Start from REL_11_STABLE (19516afdf167aeaf9e95edf7c5a105bb16f8914c) // REL_11_1-61-g19516afdf1
7+
- Add this CHANGELOG.
8+
- Port #12: Allow SQL functions to inline in the presence of costly parameter functions

src/backend/optimizer/util/clauses.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4747,7 +4747,7 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid,
47474747
else if (usecounts[i] != 1)
47484748
{
47494749
/* Param used multiple times: uncool if expensive or volatile */
4750-
QualCost eval_cost;
4750+
// QualCost eval_cost;
47514751

47524752
/*
47534753
* We define "expensive" as "contains any subplan or more than 10
@@ -4757,10 +4757,10 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid,
47574757
*/
47584758
if (contain_subplans(param))
47594759
goto fail;
4760-
cost_qual_eval(&eval_cost, list_make1(param), NULL);
4761-
if (eval_cost.startup + eval_cost.per_tuple >
4762-
10 * cpu_operator_cost)
4763-
goto fail;
4760+
// cost_qual_eval(&eval_cost, list_make1(param), NULL);
4761+
// if (eval_cost.startup + eval_cost.per_tuple >
4762+
// 10 * cpu_operator_cost)
4763+
// goto fail;
47644764

47654765
/*
47664766
* Check volatility last since this is more expensive than the

0 commit comments

Comments
 (0)