1. 11 Mar, 2009 2 commits
    • Andrew Dunstan's avatar
      Use thread-local storage for querybuffer in fmtId() on Windows, when needed (i.e. when · c394bd33
      Andrew Dunstan authored
      running pg_restore, which might run in parallel).
      Only reopen archive file when we really need to read from it, in parallel code. Otherwise,
      close it immediately in a worker, if possible.
      c394bd33
    • Tom Lane's avatar
      Improve match_special_index_operator() to recognize that LIKE with an · b4df57ff
      Tom Lane authored
      exact-match pattern (no wildcard) can be index-optimized in some cases where a
      prefix-match pattern cannot; specifically, since the required index clause is
      simple equality, it works for regular text/varchar indexes even when the
      locale is not C.  I'm not sure how often this case really comes up, but since
      it requires hardly any additional work to handle it, we might as well get it
      right.  Motivated by a discussion on the JDBC list.
      b4df57ff
  2. 10 Mar, 2009 4 commits
    • Tom Lane's avatar
      Make SubPlan nodes carry the result's typmod as well as datatype OID. This is · dcf3902f
      Tom Lane authored
      for consistency with the (relatively) recent addition of typmod to SubLink.
      An example of why it's a good idea is to be seen in the recent "failed to
      locate grouping columns" bug, which wouldn't have happened if a SubPlan
      exposed the same typmod info as the SubLink it was derived from.
      
      This could be back-patched, since it doesn't affect any on-disk data format,
      but for the moment it doesn't seem necessary to do so.
      dcf3902f
    • Tom Lane's avatar
      Fix set_subquery_pathlist() to copy the RTE's subquery before it gets mangled · 4886dc92
      Tom Lane authored
      by the planning process.  This prevents the "failed to locate grouping columns"
      error recently reported by Dickson Guedes.  That happens because planning
      replaces SubLinks by SubPlans in the subquery's targetlist, and exprTypmod()
      is smarter about the former than the latter, causing the apparent type of
      the subquery's output columns to change.  This seems to be a deficiency we
      should fix in exprTypmod(), but that will be a much more invasive patch
      with possible side-effects elsewhere, so I'll do that only in HEAD.
      
      Back-patch to 8.3.  Arguably the lack of a copying step is broken/dangerous
      all the way back, but in the absence of known problems I'll refrain from
      making the older branches pay the extra cost.  (The reason this particular
      symptom didn't appear before is that exprTypmod() wasn't smart about SubLinks
      either, until 8.3.)
      4886dc92
    • Teodor Sigaev's avatar
      Prevent recursion during parse of email-like string with multiple '@'. · 42831729
      Teodor Sigaev authored
      Patch by Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
      42831729
    • Bruce Momjian's avatar
      Doc patch for the recently added probes. · b0c68c24
      Bruce Momjian authored
      Robert Lor
      b0c68c24
  3. 09 Mar, 2009 5 commits
  4. 08 Mar, 2009 4 commits
  5. 07 Mar, 2009 3 commits
  6. 05 Mar, 2009 5 commits
  7. 04 Mar, 2009 9 commits
  8. 03 Mar, 2009 2 commits
  9. 02 Mar, 2009 2 commits
    • Tom Lane's avatar
      When we are in error recursion trouble, arrange to suppress translation and · fd9e2acc
      Tom Lane authored
      encoding conversion of any elog/ereport message being sent to the frontend.
      This generalizes a patch that I put in last October, which suppressed
      translation of only specific messages known to be associated with recursive
      can't-translate-the-message behavior.  As shown in bug #4680, we need a more
      general answer in order to have some hope of coping with broken encoding
      conversion setups.  This approach seems a good deal less klugy anyway.
      
      Patch in all supported branches.
      fd9e2acc
    • Teodor Sigaev's avatar
      Fix usage of char2wchar/wchar2char. Changes: · 32032d42
      Teodor Sigaev authored
      - pg_wchar and wchar_t could have different size, so char2wchar
        doesn't call pg_mb2wchar_with_len to prevent out-of-bound
        memory bug
      - make char2wchar/wchar2char symmetric, now they should not be
        called with C-locale because mbstowcs/wcstombs oftenly doesn't
        work correct with C-locale.
      - Text parser uses pg_mb2wchar_with_len directly in case of
        C-locale and multibyte encoding
      
      Per bug report by Hiroshi Inoue <inoue@tpf.co.jp> and
      following discussion.
      
      Backpatch up to 8.2 when multybyte support was implemented in tsearch.
      32032d42
  10. 28 Feb, 2009 3 commits
  11. 27 Feb, 2009 1 commit
    • Tom Lane's avatar
      Temporarily (I hope) disable flattening of IN/EXISTS sublinks that are within · 07b9936a
      Tom Lane authored
      the ON clause of an outer join.  Doing so is semantically correct but results
      in de-optimizing queries that were structured to take advantage of the sublink
      style of execution, as seen in recent complaint from Kevin Grittner.  Since
      the user can get the other behavior by reorganizing his query, having the
      flattening happen automatically is just a convenience, and that doesn't
      justify breaking existing applications.  Eventually it would be nice to
      re-enable this, but that seems to require a significantly different approach
      to outer joins in the executor.
      07b9936a