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

Commitcdcaec5

Browse files
committed
Avoid reversing user-given order of WHERE clauses while attaching clauses
to specific base or join RelOptInfo nodes during planning. This preservesthe more-intuitive behavior of 7.0.* --- if you write an expensive clause(such as a sub-select) last, it should get evaluated last. Someday weought to try to have some intelligence about the order of evaluation ofWHERE clauses, but for now we should not override what the user wrote.
1 parent722f7ef commitcdcaec5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/backend/optimizer/plan/initsplan.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.58 2001/03/22 03:59:36 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.59 2001/04/16 19:44:10 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -444,8 +444,8 @@ distribute_qual_to_rels(Query *root, Node *clause,
444444
*/
445445
RelOptInfo*rel=get_base_rel(root,lfirsti(relids));
446446

447-
rel->baserestrictinfo=lcons(restrictinfo,
448-
rel->baserestrictinfo);
447+
rel->baserestrictinfo=lappend(rel->baserestrictinfo,
448+
restrictinfo);
449449

450450
/*
451451
* Check for a "mergejoinable" clause even though it's not a join
@@ -549,8 +549,8 @@ add_join_info_to_rels(Query *root, RestrictInfo *restrictinfo,
549549
*/
550550
joininfo=find_joininfo_node(get_base_rel(root,cur_relid),
551551
unjoined_relids);
552-
joininfo->jinfo_restrictinfo=lcons(restrictinfo,
553-
joininfo->jinfo_restrictinfo);
552+
joininfo->jinfo_restrictinfo=lappend(joininfo->jinfo_restrictinfo,
553+
restrictinfo);
554554
}
555555
}
556556

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp