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

Commit5840c20

Browse files
committed
Rethink treatment of "postponed" quals in deconstruct_jointree().
After pulling up LATERAL subqueries, we may have qual clauses thatrefer to relations outside their syntactic scope. Before doing anysuch pullup, prepjointree.c checks to make sure that it wouldn'tcreate a semantically-invalid situation; but we leave it todeconstruct_jointree() to actually move these quals up the jointree to a place where they can be evaluated. In commit2489d76,I (tgl) refactored deconstruct_jointree() in a way that causedassertion failures while moving such quals, because the new logicfailed to distinguish "this jointree node is a parent of the sourceone" from "this jointree node is processed after the sourceone in depth-first order".Fix this, and at the same time reduce the overhead a bit, bygetting rid of the common PostponedQual list and instead making eachJoinTreeItem contain a list of quals that needed to be postponed toits level. We can help distribute_qual_to_rels find the appropriateJoinTreeItem efficiently by adding parent-item links to theJoinTreeItem data structure. This ends up being the same numberof relid subset checks as the original (pre-bug) logic, but lesslist manipulation is required during multi-level postponements.Richard Guo and Tom Lane, per bug #17768 from Robins Tharakan.Discussion:https://postgr.es/m/17768-5ac8730ece54478f@postgresql.org
1 parentfaff8f8 commit5840c20

File tree

3 files changed

+111
-120
lines changed

3 files changed

+111
-120
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp