1. 27 Aug, 2011 4 commits
  2. 26 Aug, 2011 18 commits
  3. 25 Aug, 2011 11 commits
  4. 24 Aug, 2011 6 commits
    • Alvaro Herrera's avatar
      Update FK alternative test output to new whitespace rules · f18795e7
      Alvaro Herrera authored
      With these changes, the isolation tests pass again on isolation levels
      serializable and repeatable read.
      
      Author: Kevin Grittner
      f18795e7
    • Tom Lane's avatar
      Fix pgxs.mk to always add --dbname=$(CONTRIB_TESTDB) to REGRESS_OPTS. · d1d38860
      Tom Lane authored
      The previous coding resulted in contrib modules unintentionally overriding
      the use of CONTRIB_TESTDB.  There seems no particularly good reason to
      allow that (after all, the makefile can set CONTRIB_TESTDB if that's really
      what it intends).
      
      In passing, document REGRESS_OPTS where the other pgxs.mk options are
      documented.
      
      Back-patch to 9.1 --- in prior versions, there were no cases of contrib
      modules setting REGRESS_OPTS without including the --dbname switch, so
      while the coding was fragile there was no actual bug.
      d1d38860
    • Peter Eisentraut's avatar
      Build src/ before contrib/ in make world · 4803de6f
      Peter Eisentraut authored
      This fixes failures under parallel make when contrib modules use a
      generated backend header file (such as errcodes.h).
      4803de6f
    • Tom Lane's avatar
      Avoid locale dependency in expected output. · ba69b419
      Tom Lane authored
      We'll have to settle for just listing the extensions' data types,
      since function arguments seem to sort differently in different locales.
      Per buildfarm results.
      ba69b419
    • Tom Lane's avatar
      Fix multiple bugs in extension dropping. · cb5c2ba2
      Tom Lane authored
      When we implemented extensions, we made findDependentObjects() treat
      EXTENSION dependency links similarly to INTERNAL links.  However, that
      logic contained an implicit assumption that an object could have at most
      one INTERNAL dependency, so it did not work correctly for objects having
      both INTERNAL and DEPENDENCY links.  This led to failure to drop some
      extension member objects when dropping the extension.  Furthermore, we'd
      never actually exercised the case of recursing to an internally-referenced
      (owning) object from anything other than a NORMAL dependency, and it turns
      out that passing the incoming dependency's flags to the owning object is
      the Wrong Thing.  This led to sometimes dropping a whole extension silently
      when we should have rejected the drop command for lack of CASCADE.
      
      Since we obviously were under-testing extension drop scenarios, add some
      regression test cases.  Unfortunately, such test cases require some
      extensions (duh), so we can't test for problems in the core regression
      tests.  I chose to add them to the earthdistance contrib module, which is
      a good test case because it has a dependency on the cube contrib module.
      
      Back-patch to 9.1.  Arguably these are pre-existing bugs in INTERNAL
      dependency handling, but since it appears that the cases can never arise
      pre-9.1, I'll refrain from back-patching the logic changes further than
      that.
      cb5c2ba2
    • Tom Lane's avatar
      Make CREATE EXTENSION check schema creation permissions. · d4aa4914
      Tom Lane authored
      When creating a new schema for a non-relocatable extension, we neglected
      to check whether the calling user has permission to create schemas.
      That didn't matter in the original coding, since we had already checked
      superuserness, but in the new dispensation where users need not be
      superusers, we should check it.  Use CreateSchemaCommand() rather than
      calling NamespaceCreate() directly, so that we also enforce the rules
      about reserved schema names.
      
      Per complaint from KaiGai Kohei, though this isn't the same as his patch.
      d4aa4914
  5. 23 Aug, 2011 1 commit
    • Tom Lane's avatar
      Fix overoptimistic assumptions in column width estimation for subqueries. · 43f0c208
      Tom Lane authored
      set_append_rel_pathlist supposed that, while computing per-column width
      estimates for the appendrel, it could ignore child rels for which the
      translated reltargetlist entry wasn't a Var.  This gave rise to completely
      silly estimates in some common cases, such as constant outputs from some or
      all of the arms of a UNION ALL.  Instead, fall back on get_typavgwidth to
      estimate from the value's datatype; which might be a poor estimate but at
      least it's not completely wacko.
      
      That problem was exposed by an Assert in set_subquery_size_estimates, which
      unfortunately was still overoptimistic even with that fix, since we don't
      compute attr_widths estimates for appendrels that are entirely excluded by
      constraints.  So remove the Assert; we'll just fall back on get_typavgwidth
      in such cases.
      
      Also, since set_subquery_size_estimates calls set_baserel_size_estimates
      which calls set_rel_width, there's no need for set_subquery_size_estimates
      to call get_typavgwidth; set_rel_width will handle it for us if we just
      leave the estimate set to zero.  Remove the unnecessary code.
      
      Per report from Erik Rijkers and subsequent investigation.
      43f0c208