1. 26 Feb, 2008 6 commits
  2. 25 Feb, 2008 3 commits
    • Tom Lane's avatar
      Reject year zero during datetime input, except when it's a 2-digit year · bc93919b
      Tom Lane authored
      (then it means 2000 AD).  Formerly we silently interpreted this as 1 BC,
      which at best is unwarranted familiarity with the implementation.
      It's barely possible that some app somewhere expects the old behavior,
      though, so we won't back-patch this into existing release branches.
      bc93919b
    • Tom Lane's avatar
      Fix datetime input to behave correctly for Feb 29 in years BC. · 05506fc4
      Tom Lane authored
      Formerly, DecodeDate attempted to verify the day-of-the-month exactly, but
      it was under the misapprehension that it would know whether we were looking
      at a BC year or not.  In reality this check can't be made until the calling
      function (eg DecodeDateTime) has processed all the fields.  So, split the
      BC adjustment and validity checks out into a new function ValidateDate that
      is called only after processing all the fields.  In passing, this patch
      makes DecodeTimeOnly work for BC inputs, which it never did before.
      
      (The historical veracity of all this is nonexistent, of course, but if
      we're going to say we support proleptic Gregorian calendar then we should
      do it correctly.  In any case the unpatched code is broken because it could
      emit dates that it would then reject on re-inputting.)
      
      Per report from Bernd Helmle.  Back-patch as far as 8.0; in 7.x we were
      not using our own calendar support and so this seems a bit too risky
      to put into 7.4.
      05506fc4
    • Peter Eisentraut's avatar
      Link postgres from all object files at once, to avoid the error-prone · 9956ddc1
      Peter Eisentraut authored
      SUBSYS.o step and allow for better optimization by the linker.
      
      Instead of partial linking into SUBSYS.o, the list of object files is
      assembled in objfiles.txt files that are expanded when the final
      linking is done.
      
      Because we are not yet sure how long command lines different platforms
      can handle, the old way of linking is still available, by defining the
      make variable PARTIAL_LINKING (e.g., make all PARTIAL_LINKING=1).  If
      we determine that this is necessary for some platforms, then we will
      document this in a more prominent place.
      9956ddc1
  3. 24 Feb, 2008 1 commit
  4. 23 Feb, 2008 2 commits
    • Tom Lane's avatar
      Avoid trying to print a NULL char pointer in --describe-config. On some · 2e0e5631
      Tom Lane authored
      platforms this works, but on some it crashes.  Zdenek Kotala
      2e0e5631
    • Tom Lane's avatar
      Change the declaration of struct varlena so that the length word is · 9713c063
      Tom Lane authored
      represented as "char ...[4]" not "int32".  Since the length word is never
      supposed to be accessed via this struct member anyway, this won't break
      any existing code that is following the rules.  The advantage is that C
      compilers will no longer assume that a pointer to struct varlena is
      word-aligned, which prevents incorrect optimizations in TOAST-pointer
      access and perhaps other places.  gcc doesn't seem to do this (at least
      not at -O2), but the problem is demonstrable on some other compilers.
      
      I changed struct inet as well, but didn't bother to touch a lot of other
      struct definitions in which it wouldn't make any difference because there
      were other fields forcing int alignment anyway.  Hopefully none of those
      struct definitions are used for accessing unaligned Datums.
      9713c063
  5. 20 Feb, 2008 6 commits
  6. 19 Feb, 2008 10 commits
  7. 18 Feb, 2008 4 commits
  8. 17 Feb, 2008 4 commits
    • Michael Meskes's avatar
      - Removed duplicate include of ecpgtype.h which meant I had to adapt all expected results. · a9bc069c
      Michael Meskes authored
      - Changed INFORMIX mode symbol definition yet again because the old way didn't work on NetBSD. Hopefully this one does.
      a9bc069c
    • Peter Eisentraut's avatar
      Upgrade to Autoconf 2.61: · b1203823
      Peter Eisentraut authored
      - Change configure.in to use Autoconf 2.61 and update generated files.
      - Update build system and documentation to support now directory variables
        offered by Autoconf 2.61.
      - Replace usages of PGAC_CHECK_ALIGNOF by AC_CHECK_ALIGNOF, now available
        in Autoconf 2.61.
      - Drop our patched version of AC_C_INLINE, as Autoconf now has the change.
      b1203823
    • Tom Lane's avatar
      8b63aa1f
    • Tom Lane's avatar
      Replace time_t with pg_time_t (same values, but always int64) in on-disk · cd004067
      Tom Lane authored
      data structures and backend internal APIs.  This solves problems we've seen
      recently with inconsistent layout of pg_control between machines that have
      32-bit time_t and those that have already migrated to 64-bit time_t.  Also,
      we can get out from under the problem that Windows' Unix-API emulation is not
      consistent about the width of time_t.
      
      There are a few remaining places where local time_t variables are used to hold
      the current or recent result of time(NULL).  I didn't bother changing these
      since they do not affect any cross-module APIs and surely all platforms will
      have 64-bit time_t before overflow becomes an actual risk.  time_t should
      be avoided for anything visible to extension modules, however.
      cd004067
  9. 16 Feb, 2008 4 commits