1. 02 2月, 2014 5 次提交
    • T
      Fix some wide-character bugs in the text-search parser. · 082c0dfa
      Tom Lane 提交于
      In p_isdigit and other character class test functions generated by the
      p_iswhat macro, the code path for non-C locales with multibyte encodings
      contained a bogus pointer cast that would accidentally fail to malfunction
      if types wchar_t and wint_t have the same width.  Apparently that is true
      on most platforms, but not on recent Cygwin releases.  Remove the cast,
      as it seems completely unnecessary (I think it arose from a false analogy
      to the need to cast to unsigned char when dealing with the <ctype.h>
      functions).  Per bug #8970 from Marco Atzeri.
      
      In the same functions, the code path for C locale with a multibyte encoding
      simply ANDed each wide character with 0xFF before passing it to the
      corresponding <ctype.h> function.  This could result in false positive
      answers for some non-ASCII characters, so use a range test instead.
      Noted by me while investigating Marco's complaint.
      
      Also, remove some useless though not actually buggy maskings and casts
      in the hand-coded p_isalnum and p_isalpha functions, which evidently
      got tested a bit more carefully than the macro-generated functions.
      082c0dfa
    • A
      fix whitespace · c8158a2e
      Andrew Dunstan 提交于
      c8158a2e
    • T
      Fix some more bugs in signal handlers and process shutdown logic. · 214c7a4f
      Tom Lane 提交于
      WalSndKill was doing things exactly backwards: it should first clear
      MyWalSnd (to stop signal handlers from touching MyWalSnd->latch),
      then disown the latch, and only then mark the WalSnd struct unused by
      clearing its pid field.
      
      Also, WalRcvSigUsr1Handler and worker_spi_sighup failed to preserve
      errno, which is surely a requirement for any signal handler.
      
      Per discussion of recent buildfarm failures.  Back-patch as far
      as the relevant code exists.
      214c7a4f
    • A
      Don't use deprecated dllwrap on Cygwin. · 7e1531a4
      Andrew Dunstan 提交于
      The preferred method is to use "cc -shared", and this allows binaries
      to be rebased if required, unlike dllwrap.
      
      Backpatch to 9.0 where we have buildfarm coverage.
      
      There are still some issues with Cygwin, especially modern Cygwin, but
      this helps us get closer to good support.
      
      Marco Atzeri.
      7e1531a4
    • A
      Copy the libpq DLL to the bin directory on Mingw and Cygwin. · d587298b
      Andrew Dunstan 提交于
      This has long been done by the MSVC build system, and has caused
      confusion in the past when programs like psql have failed to start
      because they can't find the DLL. If it's in the same directory as it now
      will be they will find it.
      
      Backpatch to all live branches.
      d587298b
  2. 01 2月, 2014 18 次提交
  3. 31 1月, 2014 10 次提交
  4. 30 1月, 2014 7 次提交
    • B
      Add checks for interval overflow/underflow · 146604ec
      Bruce Momjian 提交于
      New checks include input, month/day/time internal adjustments, addition,
      subtraction, multiplication, and negation.  Also adjust docs to
      correctly specify interval size in bytes.
      
      Report from Rok Kralj
      146604ec
    • T
      Fix unsafe references to errno within error messaging logic. · 571addd7
      Tom Lane 提交于
      Various places were supposing that errno could be expected to hold still
      within an ereport() nest or similar contexts.  This isn't true necessarily,
      though in some cases it accidentally failed to fail depending on how the
      compiler chanced to order the subexpressions.  This class of thinko
      explains recent reports of odd failures on clang-built versions, typically
      missing or inappropriate HINT fields in messages.
      
      Problem identified by Christian Kruse, who also submitted the patch this
      commit is based on.  (I fixed a few issues in his patch and found a couple
      of additional places with the same disease.)
      
      Back-patch as appropriate to all supported branches.
      571addd7
    • A
      Silence compiler warnings about possibly unset variables. · 120c5cc7
      Andrew Dunstan 提交于
      They are in fact set in every case where they are needed, but the
      compiler doesn't know that.
      
      Per gripe from Tom Lane.
      120c5cc7
    • A
      5e52e9d6
    • R
      Include planning time in EXPLAIN ANALYZE output. · 9347baa5
      Robert Haas 提交于
      This doesn't work for prepared queries, but it's not too easy to get
      the information in that case and there's some debate as to exactly
      what the right thing to measure is, so just do this for now.
      
      Andreas Karlsson, with slight doc changes by me.
      9347baa5
    • A
      Add json_array_elements_text function. · 5264d915
      Andrew Dunstan 提交于
      This was a notable omission from the json functions added in 9.3 and
      there have been numerous complaints about its absence.
      
      Laurence Rowe.
      5264d915
    • H
      Fix thinko in huge_tlb_pages patch. · 699b1f40
      Heikki Linnakangas 提交于
      We calculated the rounded-up size for the allocation, but then failed to
      use the rounded-up value in the mmap() call. Oops.
      
      Also, initialize allocsize, to silence warnings seen with some compilers,
      as pointed out by Jeff Janes.
      699b1f40