pgsql: Fix a couple of planner bugs introduced by the new ability to

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix a couple of planner bugs introduced by the new ability to
Date: 2007-07-07 20:46:45
Message-ID: 20070707204645.C274A9FB81F@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix a couple of planner bugs introduced by the new ability to discard
ORDER BY <constant> as redundant. One is that this means query_planner()
has to canonicalize pathkeys even when the query jointree is empty;
the canonicalization was always a no-op in such cases before, but no more.
Also, we have to guard against thinking that a set-returning function is
"constant" for this purpose. Add a couple of regression tests for these
evidently under-tested cases. Per report from Greg Stark and subsequent
experimentation.

Modified Files:
--------------
pgsql/src/backend/optimizer/path:
equivclass.c (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/equivclass.c.diff?r1=1.2&r2=1.3)
pgsql/src/backend/optimizer/plan:
planmain.c (r1.101 -> r1.102)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planmain.c.diff?r1=1.101&r2=1.102)
pgsql/src/test/regress/expected:
select.out (r1.17 -> r1.18)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/select.out.diff?r1=1.17&r2=1.18)
pgsql/src/test/regress/sql:
select.sql (r1.13 -> r1.14)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/select.sql.diff?r1=1.13&r2=1.14)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2007-07-08 00:41:11 pgsql: Remove, per Magnus: < o Check WSACancelBlockingCall() for
Previous Message Magnus Hagander 2007-07-07 07:43:21 pgsql: Move parse.h into src/backend on msvc, which is where it is on