diff options
Diffstat (limited to 'src/backend/utils/adt/selfuncs.c')
-rw-r--r-- | src/backend/utils/adt/selfuncs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index edfd8435aaa..5c30577cdfe 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -4506,6 +4506,12 @@ examine_simple_variable(PlannerInfo *root, Var *var, TargetEntry *ste; /* + * Punt if it's a whole-row var rather than a plain column reference. + */ + if (var->varattno == InvalidAttrNumber) + return; + + /* * Punt if subquery uses set operations or GROUP BY, as these will * mash underlying columns' stats beyond recognition. (Set ops are * particularly nasty; if we forged ahead, we would return stats |