1. 24 Aug, 2011 1 commit
    • 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
  2. 23 Aug, 2011 5 commits
    • 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
    • Peter Eisentraut's avatar
      Use consistent format for reporting GetLastError() · 1af55e27
      Peter Eisentraut authored
      Use something like "error code %lu" for reporting GetLastError()
      values on Windows.  Previously, a mix of different wordings and
      formats were in use.
      1af55e27
    • Heikki Linnakangas's avatar
      Add recovery.conf to the index in the user manual. · 6c6a4153
      Heikki Linnakangas authored
      Fujii Masao
      6c6a4153
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      Mark cpluspluscheck as excutable in git. · 034dda61
      Bruce Momjian authored
      034dda61
  3. 22 Aug, 2011 4 commits
  4. 21 Aug, 2011 1 commit
    • Tom Lane's avatar
      Fix trigger WHEN conditions when both BEFORE and AFTER triggers exist. · b33f78df
      Tom Lane authored
      Due to tuple-slot mismanagement, evaluation of WHEN conditions for AFTER
      ROW UPDATE triggers could crash if there had been a BEFORE ROW trigger
      fired for the same update.  Fix by not trying to overload the use of
      estate->es_trig_tuple_slot.  Per report from Yoran Heling.
      
      Back-patch to 9.0, when trigger WHEN conditions were introduced.
      b33f78df
  5. 20 Aug, 2011 2 commits
    • Bruce Momjian's avatar
      Have thread_test create its test files in the current directory, rather · 6cc08e70
      Bruce Momjian authored
      than /tmp.  Also cleanup C defines and add comments.
      
      Per report by Alex Soto
      6cc08e70
    • Tom Lane's avatar
      Fix performance problem when building a lossy tidbitmap. · 08e1eedf
      Tom Lane authored
      As pointed out by Sergey Koposov, repeated invocations of tbm_lossify can
      make building a large tidbitmap into an O(N^2) operation.  To fix, make
      sure we remove more than the minimum amount of information per call, and
      add a fallback path to behave sanely if we're unable to fit the bitmap
      within the requested amount of memory.
      
      This has been wrong since the tidbitmap code was written, so back-patch
      to all supported branches.
      08e1eedf
  6. 19 Aug, 2011 9 commits
  7. 18 Aug, 2011 10 commits
  8. 17 Aug, 2011 8 commits