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

Commit2b8758a

Browse files
committed
Repair oversight in creation of "append relations": we should set up
rel->tuples as well as rel->rows, since some estimation functions expect bothto be valid in every baserel. Per report from Dave Dutcher.
1 parent5681cde commit2b8758a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/backend/optimizer/path/allpaths.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.157 2007/01/20 20:45:38 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.158 2007/01/28 18:50:40 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -393,6 +393,12 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
393393
}
394394
}
395395

396+
/*
397+
* Set "raw tuples" count equal to "rows" for the appendrel; needed
398+
* because some places assume rel->tuples is valid for any baserel.
399+
*/
400+
rel->tuples=rel->rows;
401+
396402
/*
397403
* Finally, build Append path and install it as the only access path for
398404
* the parent rel.(Note: this is correct even if we have zero or one

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp