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

Commit449d5ac

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 parentc6ec879 commit449d5ac

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

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp