1. 09 9月, 2011 3 次提交
  2. 08 9月, 2011 10 次提交
  3. 07 9月, 2011 15 次提交
  4. 06 9月, 2011 9 次提交
  5. 05 9月, 2011 3 次提交
    • T
      Guard against using plperl's Makefile without specifying --with-perl. · 6a24742c
      Tom Lane 提交于
      The $(PERL) macro will be set by configure if it finds perl at all,
      but $(perl_privlibexp) isn't configured unless you said --with-perl.
      This results in confusing error messages if someone cd's into
      src/pl/plperl and tries to build there despite the configure omission,
      as reported by Tomas Vondra in bug #6198.  Add simple checks to
      provide a more useful report, while not disabling other use of the
      makefile such as "make clean".
      
      Back-patch to 9.0, which is as far as the patch applies easily.
      6a24742c
    • T
      Change get_variable_numdistinct's API to flag default estimates explicitly. · 4c2777d0
      Tom Lane 提交于
      Formerly, callers tested for DEFAULT_NUM_DISTINCT, which had the problem
      that a perfectly solid estimate might be mistaken for a content-free
      default.
      4c2777d0
    • T
      Dig down into sub-selects to look for column statistics. · 1cb108ef
      Tom Lane 提交于
      If a sub-select's output column is a simple Var, recursively look for
      statistics applying to that Var, and use them if available.  The need for
      this was foreseen ages ago, but we didn't have enough infrastructure to do
      it with reasonable speed until just now.
      
      We punt and stick with default estimates if the subquery uses set
      operations, GROUP BY, or DISTINCT, since those operations would change the
      underlying column statistics (particularly, the relative frequencies of
      different values) beyond recognition.  This means that the types of
      sub-selects for which this improvement applies are fairly limited, since
      most subqueries satisfying those restrictions would have gotten flattened
      into the parent query anyway.  But it does help for some cases, such as
      subqueries with ORDER BY or LIMIT.
      1cb108ef