Log Message: ----------- Restore the former RestrictInfo field valid_everywhere (but invert the flag sense and rename to "outerjoin_delayed" to more clearly reflect what it means). I had decided that it was redundant in 8.1, but the folly of this is exposed by a bug report from Sebastian Böck. The place where it's needed is to prevent orindxpath.c from cherry-picking arms of an outer-join OR clause to form a relation restriction that isn't actually legal to push down to the relation scan level. There may be some legal cases that this forbids optimizing, but we'd need much closer analysis to determine it.
Modified Files: -------------- pgsql/src/backend/nodes: copyfuncs.c (r1.316 -> r1.317) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/copyfuncs.c.diff?r1=1.316&r2=1.317) equalfuncs.c (r1.253 -> r1.254) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/equalfuncs.c.diff?r1=1.253&r2=1.254) outfuncs.c (r1.261 -> r1.262) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c.diff?r1=1.261&r2=1.262) pgsql/src/backend/optimizer/path: indxpath.c (r1.191 -> r1.192) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/indxpath.c.diff?r1=1.191&r2=1.192) orindxpath.c (r1.75 -> r1.76) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/orindxpath.c.diff?r1=1.75&r2=1.76) pgsql/src/backend/optimizer/plan: initsplan.c (r1.110 -> r1.111) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/initsplan.c.diff?r1=1.110&r2=1.111) pgsql/src/backend/optimizer/util: restrictinfo.c (r1.41 -> r1.42) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/restrictinfo.c.diff?r1=1.41&r2=1.42) pgsql/src/include/nodes: relation.h (r1.119 -> r1.120) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h.diff?r1=1.119&r2=1.120) pgsql/src/include/optimizer: restrictinfo.h (r1.34 -> r1.35) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/restrictinfo.h.diff?r1=1.34&r2=1.35) ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster