1. 14 Oct, 2008 1 commit
  2. 21 Mar, 2008 1 commit
    • Tom Lane's avatar
      Get rid of a bunch of #ifdef HAVE_INT64_TIMESTAMP conditionals by inventing · 2d0583a1
      Tom Lane authored
      a new typedef TimeOffset to represent an intermediate time value.  It's
      either int64 or double as appropriate, and in most usages will be measured
      in microseconds or seconds the same as Timestamp.  We don't call it
      Timestamp, though, since the value doesn't necessarily represent an absolute
      time instant.
      
      Warren Turkal
      2d0583a1
  3. 01 Jan, 2008 1 commit
  4. 06 Jul, 2007 1 commit
  5. 05 Jun, 2007 1 commit
    • Tom Lane's avatar
      Downgrade implicit casts to text to be assignment-only, except for the ones · 31edbadf
      Tom Lane authored
      from the other string-category types; this eliminates a lot of surprising
      interpretations that the parser could formerly make when there was no directly
      applicable operator.
      
      Create a general mechanism that supports casts to and from the standard string
      types (text,varchar,bpchar) for *every* datatype, by invoking the datatype's
      I/O functions.  These new casts are assignment-only in the to-string direction,
      explicit-only in the other, and therefore should create no surprising behavior.
      Remove a bunch of thereby-obsoleted datatype-specific casting functions.
      
      The "general mechanism" is a new expression node type CoerceViaIO that can
      actually convert between *any* two datatypes if their external text
      representations are compatible.  This is more general than needed for the
      immediate feature, but might be useful in plpgsql or other places in future.
      
      This commit does nothing about the issue that applying the concatenation
      operator || to non-text types will now fail, often with strange error messages
      due to misinterpreting the operator as array concatenation.  Since it often
      (not always) worked before, we should either make it succeed or at least give
      a more user-friendly error; but details are still under debate.
      
      Peter Eisentraut and Tom Lane
      31edbadf
  6. 05 Jan, 2007 1 commit
  7. 30 Dec, 2006 1 commit
  8. 13 Jul, 2006 1 commit
  9. 05 Mar, 2006 1 commit
  10. 15 Oct, 2005 1 commit
  11. 09 Oct, 2005 1 commit
    • Tom Lane's avatar
      Fix (hopefully for the last time) problems with datetime values displaying · 313ed1ed
      Tom Lane authored
      like '23:59:60' because of fractional-second roundoff problems.  Trying
      to control this upstream of the actual display code was hopeless; the right
      way is to explicitly round fractional seconds in the display code and then
      refigure the results if the fraction rounds up to 1.  Per bug #1927.
      313ed1ed
  12. 25 Feb, 2005 1 commit
  13. 31 Dec, 2004 1 commit
    • PostgreSQL Daemon's avatar
      · 2ff50159
      PostgreSQL Daemon authored
      Tag appropriate files for rc3
      
      Also performed an initial run through of upgrading our Copyright date to
      extend to 2005 ... first run here was very simple ... change everything
      where: grep 1996-2004 && the word 'Copyright' ... scanned through the
      generated list with 'less' first, and after, to make sure that I only
      picked up the right entries ...
      2ff50159
  14. 29 Aug, 2004 1 commit
  15. 02 Jul, 2004 1 commit
    • Tom Lane's avatar
      Add missing operators of the form interval-plus-datetime, as required for · e34082ee
      Tom Lane authored
      better SQL compliance in this area, per recent discussion.  Mark related
      operators as commutators where possible.  (The system doesn't actually care
      about commutator marking for operators not returning boolean, at the moment,
      but this seems forward-thinking and besides it made it easier to verify
      that we hadn't missed any.)
      Also, remove interval-minus-time and interval-minus-timetz operators.
      I'm not sure how these got in, but they are nonstandard and had very
      obviously broken behavior.  (minus is not commutative in anyone's book.)
      I doubt anyone had ever used 'em, because we'd surely have gotten a bug
      report about it if so.
      e34082ee
  16. 14 Feb, 2004 1 commit
  17. 29 Nov, 2003 1 commit
    • PostgreSQL Daemon's avatar
      · 55b11325
      PostgreSQL Daemon authored
      make sure the $Id tags are converted to $PostgreSQL as well ...
      55b11325
  18. 04 Aug, 2003 1 commit
  19. 12 May, 2003 1 commit
  20. 29 Jan, 2003 1 commit
    • Tom Lane's avatar
      Repair array subscript overrun identified by Yichen Xie. Reduce the · 23b8a0ce
      Tom Lane authored
      value of MAX_TIME_PRECISION in floating-point-timestamp-storage case
      from 13 to 10, which is as much as time_out is actually willing to print.
      (The alternative of increasing the number of digits we are willing to
      print looks risky; we might find ourselves printing roundoff garbage.)
      23b8a0ce
  21. 04 Sep, 2002 1 commit
  22. 20 Jun, 2002 1 commit
  23. 23 Apr, 2002 1 commit
  24. 21 Apr, 2002 1 commit
    • Thomas G. Lockhart's avatar
      Support alternate storage scheme of 64-bit integer for date/time types. · 547df0cc
      Thomas G. Lockhart authored
       Use "--enable-integer-datetimes" in configuration to use this rather
       than the original float8 storage. I would recommend the integer-based
       storage for any platform on which it is available. We perhaps should
       make this the default for the production release.
      Change timezone(timestamptz) results to return timestamp rather than
       a character string. Formerly, we didn't have a way to represent
       timestamps with an explicit time zone other than freezing the info into
       a string. Now, we can reasonably omit the explicit time zone from the
       result and return a timestamp with values appropriate for the specified
       time zone. Much cleaner, and if you need the time zone in the result
       you can put it into a character string pretty easily anyway.
      Allow fractional seconds in date/time types even for dates prior to 1BC.
      Limit timestamp data types to 6 decimal places of precision. Just right
       for a micro-second storage of int8 date/time types, and reduces the
       number of places ad-hoc rounding was occuring for the float8-based types.
      Use lookup tables for precision/rounding calculations for timestamp and
       interval types.  Formerly used pow() to calculate the desired value but
       with a more limited range there is no reason to not type in a lookup
       table. Should be *much* better performance, though formerly there were
       some optimizations to help minimize the number of times pow() was called.
      Define a HAVE_INT64_TIMESTAMP variable. Based on the configure option
       "--enable-integer-datetimes" and the existing internal INT64_IS_BUSTED.
      Add explicit date/interval operators and functions for addition and
       subtraction. Formerly relied on implicit type promotion from date to
       timestamp with time zone.
      Change timezone conversion functions for the timetz type from "timetz()"
       to "timezone()". This is consistant with other time zone coersion
       functions for other types.
      Bump the catalog version to 200204201.
      Fix up regression tests to reflect changes in fractional seconds
       representation for date/times in BC eras.
      All regression tests pass on my Linux box.
      547df0cc
  25. 05 Nov, 2001 1 commit
  26. 28 Oct, 2001 1 commit
  27. 25 Oct, 2001 1 commit
  28. 18 Oct, 2001 1 commit
    • Thomas G. Lockhart's avatar
      Accept an INTERVAL argument for SET TIME ZONE per SQL99. · 9310075a
      Thomas G. Lockhart authored
       Modified the parser and the SET handlers to use full Node structures
       rather than simply a character string argument.
      Implement INTERVAL() YEAR TO MONTH (etc) syntax per SQL99.
       Does not yet accept the goofy string format that goes along with, but
       this should be fairly straight forward to fix now as a bug or later
       as a feature.
      Implement precision for the INTERVAL() type.
       Use the typmod mechanism for both of INTERVAL features.
      Fix the INTERVAL syntax in the parser:
       opt_interval was in the wrong place.
      INTERVAL is now a reserved word, otherwise we get reduce/reduce errors.
      Implement an explicit date_part() function for TIMETZ.
       Should fix coersion problem with INTERVAL reported by Peter E.
      Fix up some error messages for date/time types.
       Use all caps for type names within message.
      Fix recently introduced side-effect bug disabling 'epoch' as a recognized
       field for date_part() etc. Reported by Peter E. (??)
      Bump catalog version number.
      Rename "microseconds" current transaction time field
       from ...Msec to ...Usec. Duh!
      date/time regression tests updated for reference platform, but a few
       changes will be necessary for others.
      9310075a
  29. 03 Oct, 2001 1 commit
    • Thomas G. Lockhart's avatar
      Implement precision support for timestamp and time, both with and without · 3e1beda2
      Thomas G. Lockhart authored
       time zones.
      SQL99 spec requires a default of zero (round to seconds) which is set
       in gram.y as typmod is set in the parse tree. We *could* change to a
       default of either 6 (for internal compatibility with previous versions)
       or 2 (for external compatibility with previous versions).
      Evaluate entries in pg_proc wrt the iscachable attribute for timestamp and
       other date/time types. Try to recognize cases where side effects like the
       current time zone setting may have an effect on results to decide whether
       something is cachable or not.
      3e1beda2
  30. 28 Sep, 2001 1 commit
    • Thomas G. Lockhart's avatar
      Measure the current transaction time to milliseconds. · 6f58115d
      Thomas G. Lockhart authored
      Define a new function, GetCurrentTransactionStartTimeUsec() to get the time
       to this precision.
      Allow now() and timestamp 'now' to use this higher precision result so
       we now have fractional seconds in this "constant".
      Add timestamp without time zone type.
      Move previous timestamp type to timestamp with time zone.
      Accept another ISO variant for date/time values: yyyy-mm-ddThh:mm:ss
       (note the "T" separating the day from hours information).
      Remove 'current' from date/time types; convert to 'now' in input.
      Separate time and timetz regression tests.
      Separate timestamp and timestamptz regression test.
      6f58115d
  31. 22 Mar, 2001 1 commit
  32. 24 Jan, 2001 1 commit
  33. 23 Jan, 2001 2 commits
  34. 03 Dec, 2000 1 commit
    • Thomas G. Lockhart's avatar
      Repair usage of the OVERLAPS operator. · 6969b8fa
      Thomas G. Lockhart authored
      Allow some operator-like tokens to be used as function names.
      Flesh out support for time, timetz, and interval operators
       and interactions.
      Regression tests pass, but non-reference-platform horology test results
       will need to be updated.
      6969b8fa
  35. 11 Nov, 2000 1 commit
  36. 19 Jun, 2000 1 commit
  37. 09 Jun, 2000 1 commit
  38. 12 Apr, 2000 1 commit
  39. 14 Mar, 2000 1 commit
    • Thomas G. Lockhart's avatar
      Implement column aliases on views "CREATE VIEW name (collist)". · 64568100
      Thomas G. Lockhart authored
      Implement TIME WITH TIME ZONE type (timetz internal type).
      Remap length() for character strings to CHAR_LENGTH() for SQL92
       and to remove the ambiguity with geometric length() functions.
      Keep length() for character strings for backward compatibility.
      Shrink stored views by removing internal column name list from visible rte.
      Implement min(), max() for time and timetz data types.
      Implement conversion of TIME to INTERVAL.
      Implement abs(), mod(), fac() for the int8 data type.
      Rename some math functions to generic names:
       round(), sqrt(), cbrt(), pow(), etc.
      Rename NUMERIC power() function to pow().
      Fix int2 factorial to calculate result in int4.
      Enhance the Oracle compatibility function translate() to work with string
       arguments (from Edwin Ramirez).
      Modify pg_proc system table to remove OID holes.
      64568100