From 1bdf124b94af3c24d3c3083c820804274df8262b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 14 Nov 2005 23:54:23 +0000 Subject: =?UTF-8?q?Restore=20the=20former=20RestrictInfo=20field=20valid?= =?UTF-8?q?=5Feverywhere=20(but=20invert=20the=20flag=20sense=20and=20rena?= =?UTF-8?q?me=20to=20"outerjoin=5Fdelayed"=20to=20more=20clearly=20reflect?= =?UTF-8?q?=20what=20it=20means).=20=20I=20had=20decided=20that=20it=20was?= =?UTF-8?q?=20redundant=20in=208.1,=20but=20the=20folly=20of=20this=20is?= =?UTF-8?q?=20exposed=20by=20a=20bug=20report=20from=20Sebastian=20B=C3=B6?= =?UTF-8?q?ck.=20=20The=20place=20where=20it's=20needed=20is=20to=20preven?= =?UTF-8?q?t=20orindxpath.c=20from=20cherry-picking=20arms=20of=20an=20out?= =?UTF-8?q?er-join=20OR=20clause=20to=20form=20a=20relation=20restriction?= =?UTF-8?q?=20that=20isn't=20actually=20legal=20to=20push=20down=20to=20th?= =?UTF-8?q?e=20relation=20scan=20level.=20=20There=20may=20be=20some=20leg?= =?UTF-8?q?al=20cases=20that=20this=20forbids=20optimizing,=20but=20we'd?= =?UTF-8?q?=20need=20much=20closer=20analysis=20to=20determine=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/include/nodes/relation.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/include/nodes') diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 01aa96d717..15d5647282 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.119 2005/10/15 02:49:45 momjian Exp $ + * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.120 2005/11/14 23:54:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -714,6 +714,11 @@ typedef struct HashPath * joined, will also have is_pushed_down set because it will get attached to * some lower joinrel. * + * When application of a qual must be delayed by outer join, we also mark it + * with outerjoin_delayed = true. This isn't redundant with required_relids + * because that might equal clause_relids whether or not it's an outer-join + * clause. + * * In general, the referenced clause might be arbitrarily complex. The * kinds of clauses we can handle as indexscan quals, mergejoin clauses, * or hashjoin clauses are fairly limited --- the code for each kind of @@ -740,6 +745,8 @@ typedef struct RestrictInfo bool is_pushed_down; /* TRUE if clause was pushed down in level */ + bool outerjoin_delayed; /* TRUE if delayed by outer join */ + /* * This flag is set true if the clause looks potentially useful as a merge * or hash join clause, that is if it is a binary opclause with -- cgit v1.2.1