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

Commite243bd7

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 parentfbbd150 commite243bd7

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
@@ -4504,6 +4504,12 @@ examine_simple_variable(PlannerInfo *root, Var *var,
45044504
RelOptInfo*rel;
45054505
TargetEntry*ste;
45064506

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp