1. 30 Oct, 2010 2 commits
  2. 29 Oct, 2010 5 commits
    • Tom Lane's avatar
      Fix comparisons of pointers with zero to compare with NULL instead. · bfd3f37b
      Tom Lane authored
      Per C standard, these are semantically the same thing; but saying NULL
      when you mean NULL is good for readability.
      
      Marti Raudsepp, per results of INRIA's Coccinelle.
      bfd3f37b
    • Tom Lane's avatar
      Oops, missed one fix for EquivalenceClass rearrangement. · 48a1fb23
      Tom Lane authored
      Now that we're expecting a mergeclause's left_ec/right_ec to persist from
      the initial assignments, we can't just blithely zero these out when
      transforming such a clause in adjust_appendrel_attrs.  But really it should
      be okay to keep the parent's values, since a child table's derived Var
      ought to be equivalent to the parent Var for all EquivalenceClass purposes.
      (Indeed, I'm wondering whether we couldn't find a way to dispense with
      add_child_rel_equivalences altogether.  But this is wrong in any case.)
      48a1fb23
    • Tom Lane's avatar
      Avoid creation of useless EquivalenceClasses during planning. · 14231a41
      Tom Lane authored
      Zoltan Boszormenyi exhibited a test case in which planning time was
      dominated by construction of EquivalenceClasses and PathKeys that had no
      actual relevance to the query (and in fact got discarded immediately).
      This happened because we generated PathKeys describing the sort ordering of
      every index on every table in the query, and only after that checked to see
      if the sort ordering was relevant.  The EC/PK construction code is O(N^2)
      in the number of ECs, which is all right for the intended number of such
      objects, but it gets out of hand if there are ECs for lots of irrelevant
      indexes.
      
      To fix, twiddle the handling of mergeclauses a little bit to ensure that
      every interesting EC is created before we begin path generation.  (This
      doesn't cost anything --- in fact I think it's a bit cheaper than before
      --- since we always eventually created those ECs anyway.)  Then, if an
      index column can't be found in any pre-existing EC, we know that that sort
      ordering is irrelevant for the query.  Instead of creating a useless EC,
      we can just not build a pathkey for the index column in the first place.
      The index will still be considered if it's useful for non-order-related
      reasons, but we will think of its output as unsorted.
      14231a41
    • Heikki Linnakangas's avatar
      Give a more specific error message if you try to COMMIT, ROLLBACK or COPY · f184de35
      Heikki Linnakangas authored
      FROM STDIN in PL/pgSQL. We alread did this for dynamic EXECUTE statements,
      ie. "EXECUTE 'COMMIT'", but not otherwise.
      f184de35
    • Andrew Dunstan's avatar
      6c3c7b53
  3. 28 Oct, 2010 9 commits
  4. 27 Oct, 2010 5 commits
  5. 26 Oct, 2010 7 commits
  6. 25 Oct, 2010 7 commits
  7. 24 Oct, 2010 1 commit
  8. 22 Oct, 2010 3 commits
  9. 21 Oct, 2010 1 commit