1. 09 May, 2010 2 commits
    • Tom Lane's avatar
      Fix typo: PGTYPES_NUM_OVERFLOW should be PGTYPES_NUM_UNDERFLOW. · 4768fd3f
      Tom Lane authored
      Noted by KOIZUMI Satoru.
      4768fd3f
    • Tom Lane's avatar
      Adjust comments about avoiding use of printf's %.*s. · ed437e2b
      Tom Lane authored
      My initial impression that glibc was measuring the precision in characters
      (which is what the Linux man page says it does) was incorrect.  It does take
      the precision to be in bytes, but it also tries to truncate the string at a
      character boundary.  The bottom line remains the same: it will mess up
      if the string is not in the encoding it expects, so we need to avoid %.*s
      anytime there's a significant risk of that.  Previous code changes are still
      good, but adjust the comments to reflect this knowledge.  Per research by
      Hernan Gonzalez.
      ed437e2b
  2. 08 May, 2010 1 commit
    • Tom Lane's avatar
      Work around a subtle portability problem in use of printf %s format. · 54cd4f04
      Tom Lane authored
      Depending on which spec you read, field widths and precisions in %s may be
      counted either in bytes or characters.  Our code was assuming bytes, which
      is wrong at least for glibc's implementation, and in any case libc might
      have a different idea of the prevailing encoding than we do.  Hence, for
      portable results we must avoid using anything more complex than just "%s"
      unless the string to be printed is known to be all-ASCII.
      
      This patch fixes the cases I could find, including the psql formatting
      failure reported by Hernan Gonzalez.  In HEAD only, I also added comments
      to some places where it appears safe to continue using "%.*s".
      54cd4f04
  3. 07 May, 2010 1 commit
  4. 06 May, 2010 2 commits
  5. 05 May, 2010 2 commits
  6. 03 May, 2010 5 commits
  7. 02 May, 2010 6 commits
  8. 01 May, 2010 4 commits
    • Tom Lane's avatar
      Add code to InternalIpcMemoryCreate() to handle the case where shmget() · 15416323
      Tom Lane authored
      returns EINVAL for an existing shared memory segment.  Although it's not
      terribly sensible, that behavior does meet the POSIX spec because EINVAL
      is the appropriate error code when the existing segment is smaller than the
      requested size, and the spec explicitly disclaims any particular ordering of
      error checks.  Moreover, it does in fact happen on OS X and probably other
      BSD-derived kernels.  (We were able to talk NetBSD into changing their code,
      but purging that behavior from the wild completely seems unlikely to happen.)
      We need to distinguish collision with a pre-existing segment from invalid size
      request in order to behave sensibly, so it's worth some extra code here to get
      it right.  Per report from Gavin Kistner and subsequent investigation.
      
      Back-patch to all supported versions, since any of them could get used
      with a kernel having the debatable behavior.
      15416323
    • Tom Lane's avatar
      Install hack workaround for failure of 'make all' in VPATH builds. · 170456c9
      Tom Lane authored
      It appears that gmake gets confused if postgres.sgml is not present in
      the working directory, and instantiates some default rule or other that
      would let postgres.sgml be built from postgres.xml.  I haven't been able
      to track down exactly where that's coming from, but the problem can be
      dodged by specifying srcdir explicitly in the rule for postgres.xml.
      Per report from Vladimir Kokovic.
      170456c9
    • Tom Lane's avatar
      Adjust postgres.xml rule so that make will notice a failure exit from osx. · f856fad8
      Tom Lane authored
      The previous coding had it in a pipe, which on most shells won't report
      the error.  Per experimentation with a bug report from Vladimir Kokovic.
      This doesn't actually fix his problem, but it does explain why make
      didn't report that there was a problem.
      f856fad8
    • Tom Lane's avatar
      Fix leakage of proc-related storage in plpython's inline handler. · f5c23ca2
      Tom Lane authored
      Per report from Andres Freund.
      f5c23ca2
  9. 30 Apr, 2010 6 commits
  10. 29 Apr, 2010 7 commits
  11. 28 Apr, 2010 4 commits