1. 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
  2. 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
  3. 06 Sep, 2001 1 commit
    • Bruce Momjian's avatar
      - new to_char(interval, text) · 2a34134b
      Bruce Momjian authored
       - new millisecond (ms) and microsecond (us) support
       - more robus parsing from string - used is separator checking for
         non-exact formats like to_date('2001-9-1', 'YYYY-MM-DD')
       - SGML docs are included
      
      Karel Zak
      2a34134b
  4. 03 May, 2001 2 commits
    • Tom Lane's avatar
      Consolidate several near-identical uses of mktime() into a single · f5ba72ea
      Tom Lane authored
      routine DetermineLocalTimeZone().  In that routine, be more wary of
      broken mktime() implementations than the original code was: don't allow
      mktime to change the already-set y/m/d/h/m/s information, and don't
      use tm_gmtoff if mktime failed.  Possibly this will resolve some of
      the complaints we've been hearing from users of Middle Eastern timezones
      on RedHat.
      f5ba72ea
    • Tom Lane's avatar
      Ensure that btree sort ordering functions and boolean comparison operators · 2792374c
      Tom Lane authored
      give consistent results for all datatypes.  Types float4, float8, and
      numeric were broken for NaN values; abstime, timestamp, and interval
      were broken for INVALID values; timetz was just plain broken (some
      possible pairs of values were neither < nor = nor >).  Also clean up
      text, bpchar, varchar, and bit/varbit to eliminate duplicate code and
      thereby reduce the probability of similar inconsistencies arising in
      the future.
      2792374c
  5. 03 Apr, 2001 1 commit
  6. 22 Mar, 2001 1 commit
  7. 13 Feb, 2001 1 commit
    • Bruce Momjian's avatar
      Please apply the following patch to fix AIX and IRIX timestamp behavior · 7582bd91
      Bruce Momjian authored
      as previously discussed.
      
      It makes AIX and IRIX not use DST for dates before 1970.
      
      The following expected files need to be removed from the regression tests,
      they contain wrong results and are not needed any more.
      
      src/test/regress/expected/horology-1947-PDT.out
      src/test/regress/expected/tinterval-1947-PDT.out
      src/test/regress/expected/abstime-1947-PDT.out
      
      Zeugswetter Andreas
      7582bd91
  8. 24 Jan, 2001 1 commit
  9. 18 Jan, 2001 1 commit
    • Thomas G. Lockhart's avatar
      Fix up "Postgres-style" time interval representation when fields have · 6acdebbd
      Thomas G. Lockhart authored
       mixed-signs. Previous effort left way too many minus signs, and was at
       least as broken as the one before that :(
      Clean up "ISO-style" time interval representation to omit zero fields if
       there is at least one non-zero field. Supress some leading plus signs
       when not necessary for clarity.
      Replace every #ifdef __CYGWIN__ block with a cleaner TIMEZONE_GLOBAL macro
       defined in datetime.h.
      6acdebbd
  10. 17 Jan, 2001 1 commit
    • Thomas G. Lockhart's avatar
      Change comparisons of tm->tm_isdst from "nonzero" to "greater than zero". · 8e984038
      Thomas G. Lockhart authored
       Not sure why some were this way, and others were already correct, but it
       seems to have been like this for several years.
      This caused problems on a few damaged platforms like AIX and IRIX which do
       not support DST calculations for years before 1970.
      Thanks to Andreas Zeugswetter <ZeugswetterA@wien.spardat.at> for finding
       the problem.
      8e984038
  11. 03 Jan, 2001 1 commit
  12. 07 Dec, 2000 1 commit
    • Tom Lane's avatar
      Make OVERLAPS operators conform to SQL92 spec regarding NULL handling. · 821f4673
      Tom Lane authored
      As I read it, the spec requires a non-null result in some cases where
      one of the inputs is NULL: specifically, if the other endpoint of that
      interval is between the endpoints of the other interval, then the result
      is known TRUE despite the missing endpoint.  The spec could've been a
      lot simpler if they did not intend this behavior.
      I did not force an initdb for this change, but if you don't do one you'll
      still see the old strict-function behavior.
      821f4673
  13. 03 Dec, 2000 1 commit
  14. 11 Nov, 2000 1 commit
  15. 06 Nov, 2000 1 commit
    • Thomas G. Lockhart's avatar
      Fix INTERVAL output when year/month has different sign as day/hour etc. · 2cf16424
      Thomas G. Lockhart authored
       Previously, all fields were unsigned, with only a trailing "ago" to
       indicate negative intervals. Now, ISO format does not use "ago", and
       and the traditional PostgreSQL format has the first numeric field unsigned
       with "ago" supporting that field. So "1 month - 2 days ago" is two days
       less than a month in the past.
      Fix interval arithmetic across daylight savings time boundaries.
       Previously, most math across boundaries introduced a one hour offset.
      Allow some date/time functions to return NULL if called with NULL args.
      Implement functions for AT TIME ZONE support.
      Support "SAT" as an Australian time zone if USE_AUSTRALIAN_RULES
       is defined.
      2cf16424
  16. 29 Oct, 2000 1 commit
  17. 29 Aug, 2000 1 commit
    • Bruce Momjian's avatar
      * to_char: · dffd8cac
      Bruce Momjian authored
        - full support for IW (ISO week) and vice versa conversion for IW too
          (the to_char 'week' support is now complete and I hope correct).
      
        Thomas, I use for IW code from timestamp.c, for this I create separate
        function date2isoweek() from original 'case DTK_WEEK:' code in the
        timestamp_part(). I mean will better use one code for same feature in
        date_part() and in to_char(). The isoweek2date() is added to timestamp.c
        too. Right?
      
        IMHO in 7.1 will all to_char's features complete. It is cca 41 templates
        for date/time and cca 21 for numbers.
      
       * to_ascii:
      
         - gcc, is it correct now? :-)
      
      
        In the patch is documentation for to_char's IW and for to_ascii().
      
                                                              Karel
      dffd8cac
  18. 17 Jul, 2000 1 commit
    • Tom Lane's avatar
      Revise aggregate functions per earlier discussions in pghackers. · bec98a31
      Tom Lane authored
      There's now only one transition value and transition function.
      NULL handling in aggregates is a lot cleaner.  Also, use Numeric
      accumulators instead of integer accumulators for sum/avg on integer
      datatypes --- this avoids overflow at the cost of being a little slower.
      Implement VARIANCE() and STDDEV() aggregates in the standard backend.
      
      Also, enable new LIKE selectivity estimators by default.  Unrelated
      change, but as long as I had to force initdb anyway...
      bec98a31
  19. 12 Jul, 2000 1 commit
    • Peter Eisentraut's avatar
      Remove a bunch of unused configure tests, in particular cases where · cb292206
      Peter Eisentraut authored
      * the result is not recorded anywhere
      * the result is not used anywhere
      * the result is only used in some places, whereas others have been getting away with it
      * the result is used improperly
      
      Also make command line options handling a little better (e.g., --disable-locale,
      while redundant, should really still *dis*able).
      cb292206
  20. 05 Jul, 2000 1 commit
  21. 03 Jul, 2000 1 commit
    • Jan Wieck's avatar
      TOAST · 57d8080a
      Jan Wieck authored
          WARNING: This is actually broken - we have self-deadlocks
      	         due to concurrent changes in buffer management.
      			 Vadim and me are working on it.
      
      Jan
      57d8080a
  22. 19 Jun, 2000 1 commit
  23. 09 Jun, 2000 1 commit
  24. 08 Jun, 2000 1 commit
  25. 29 May, 2000 1 commit
  26. 14 Apr, 2000 1 commit
  27. 12 Apr, 2000 1 commit
  28. 07 Apr, 2000 1 commit
    • Thomas G. Lockhart's avatar
      Add transcendental math functions (sine, cosine, etc) · a349733b
      Thomas G. Lockhart authored
      Add a random number generator and seed setter (random(), SET SEED)
      Fix up the interval*float8 math to carry partial months
       into the time field.
      Add float8*interval so we have symmetry in the available math.
      Fix the parser and define.c to accept SQL92 types as field arguments.
      Fix the parser to accept SQL92 types for CREATE TYPE, etc. This is
       necessary to allow...
      Bit/varbit support in contrib/bit cleaned up to compile and load
       cleanly. Still needs some work before final release.
      Implement the "SOME" keyword as a synonym for "ANY" per SQL92.
      Implement ascii(text), ichar(int4), repeat(text,int4) to help
       support the ODBC driver.
      Enable the TRUNCATE() function mapping in the ODBC driver.
      a349733b
  29. 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
  30. 16 Feb, 2000 1 commit
    • Thomas G. Lockhart's avatar
      Implement "date/time grand unification". · 41f1f5b7
      Thomas G. Lockhart authored
       Transform datetime and timespan into timestamp and interval.
       Deprecate datetime and timespan, though translate to new types in gram.y.
       Transform all datetime and timespan catalog entries into new types.
       Make "INTERVAL" reserved word allowed as a column identifier in gram.y.
       Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility
        routines for all date/time types.
       date.{h,c} now deals with date, time types.
       timestamp.{h,c} now deals with timestamp, interval types.
       nabstime.{h,c} now deals with abstime, reltime, tinterval types.
      Make NUMERIC a known native type for purposes of type coersion. Not tested.
      41f1f5b7
  31. 17 Jul, 1999 1 commit
  32. 16 Jul, 1999 1 commit
  33. 15 Jul, 1999 1 commit
  34. 14 Jul, 1999 1 commit
  35. 01 Sep, 1998 1 commit
  36. 26 Feb, 1998 1 commit
  37. 23 Dec, 1997 1 commit
  38. 25 Oct, 1997 1 commit
  39. 09 Oct, 1997 1 commit