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

Commit1f36fec

Browse files
committed
Tweak distribute_qual_to_rels so that when we decide a pseudoconstant qual
can be pushed to the top of the join tree, we update both the relids andqualscope variables to keep them in sync. This prevents a possible laterfailure of an Assert clause, and affects nothing else since qualscope isn'tused later except for that Assert. At the moment the Assert shouldn't bereachable when we've pushed the qual up; but this is cheap insurance, andit's more sensible anyway in terms of the overall logic of the routine.Per analysis of a bug report from Stefan Huehner.I'm not back-patching this since it's just future-proofing; but if anyonegets tempted to change check_outerjoin_delay again in the back branches,this might be needed.
1 parent421c66b commit1f36fec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 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/plan/initsplan.c,v 1.151 2009/04/19 19:46:33 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/plan/initsplan.c,v 1.152 2009/05/06 20:31:18 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -818,9 +818,12 @@ distribute_qual_to_rels(PlannerInfo *root, Node *clause,
818818
root->hasPseudoConstantQuals= true;
819819
/* if not below outer join, push it to top of tree */
820820
if (!below_outer_join)
821+
{
821822
relids=
822823
get_relids_in_jointree((Node*)root->parse->jointree,
823824
false);
825+
qualscope=bms_copy(relids);
826+
}
824827
}
825828
}
826829
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp