Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitebefbb5

Browse files
committed
Fix failure with whole-row reference to a subquery.
Simple oversight in commit1cb108e ---recursively examining a subquery output column is only sane if theoriginal Var refers to a single output column. Found by Kevin Grittner.
1 parent0b7e660 commitebefbb5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/backend/utils/adt/selfuncs.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4505,6 +4505,12 @@ examine_simple_variable(PlannerInfo *root, Var *var,
45054505
RelOptInfo*rel;
45064506
TargetEntry*ste;
45074507

4508+
/*
4509+
* Punt if it's a whole-row var rather than a plain column reference.
4510+
*/
4511+
if (var->varattno==InvalidAttrNumber)
4512+
return;
4513+
45084514
/*
45094515
* Punt if subquery uses set operations or GROUP BY, as these will
45104516
* mash underlying columns' stats beyond recognition. (Set ops are

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp