pgsql: Fix set_append_rel_pathlist() to deal intelligently with cases

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix set_append_rel_pathlist() to deal intelligently with cases
Date: 2009-07-06 18:26:30
Message-ID: 20090706182630.6692E75331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix set_append_rel_pathlist() to deal intelligently with cases where
substituting a child rel's output expressions into the appendrel's restriction
clauses yields a pseudoconstant restriction. We might be able to skip scanning
that child rel entirely (if we get constant FALSE), or generate a one-time
filter. 8.3 more or less accidentally generated plans that weren't completely
stupid in these cases, but that was only because an extra recursive level of
subquery_planner() always occurred and allowed const-simplification to happen.
8.4's ability to pull up appendrel members with non-Var outputs exposes the
fact that we need to work harder here. Per gripe from Sergey Burladyan.

Modified Files:
--------------
pgsql/src/backend/optimizer/path:
allpaths.c (r1.183 -> r1.184)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/allpaths.c?r1=1.183&r2=1.184)
pgsql/src/backend/optimizer/prep:
prepunion.c (r1.171 -> r1.172)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepunion.c?r1=1.171&r2=1.172)
pgsql/src/backend/optimizer/util:
restrictinfo.c (r1.60 -> r1.61)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/restrictinfo.c?r1=1.60&r2=1.61)
pgsql/src/include/optimizer:
restrictinfo.h (r1.44 -> r1.45)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/restrictinfo.h?r1=1.44&r2=1.45)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-07-06 18:26:39 pgsql: Fix set_append_rel_pathlist() to deal intelligently with cases
Previous Message Peter Eisentraut 2009-07-06 17:01:42 pgsql: Show definition of index columns in \d on index This adds a