aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/nabstime.c
Commit message (Collapse)AuthorAge
...
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Fix transposed arguments for typmod for one INTERVAL production.Thomas G. Lockhart2001-10-20
| | | | | | | | | | | | | | Mask both typmod subfields for INTERVAL to avoid setting the high bit, per dire warning from Tom Lane. Clear tmask for DTK_ISO_TIME case to avoid time zone troubles. Symptom reported by Tom Lane. Clean up checking for valid time zone info in output routine. This should now work for both SQL99 and Unix-style time zones. Put in explicit check for INTERVAL() typmod rounding to avoid accumulating cruft in the lower bits. Not sure that this helps, but we'll need to do something. The symptom is visible with a query like select interval(2) '10000 days 01:02:03.040506'; Regression tests are patched to repair the Tom Lane symptom, and all pass.
* Repair missing brace in HAVE_INT_TIMEZONE case.Tom Lane2001-10-18
|
* Accept an INTERVAL argument for SET TIME ZONE per SQL99.Thomas G. Lockhart2001-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove C++ style comment. Some compilers won't accept it.Tatsuo Ishii2001-10-01
|
* Measure the current transaction time to milliseconds.Thomas G. Lockhart2001-09-28
| | | | | | | | | | | | | | 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.
* Ensure that btree sort ordering functions and boolean comparison operatorsTom Lane2001-05-03
| | | | | | | | | | 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.
* Remove bogus Assert from AbsoluteTimeIsBefore(). (If you don't thinkTom Lane2001-04-26
| | | | it's bogus, try building a btree index on the regress tests' abstime_tbl.)
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Correct bogus output formatting of timeofday() function. A number ofTom Lane2001-02-21
| | | | microseconds < 100000 should be displayed as, eg, 13.000126, not 13.126.
* Please apply the following patch to fix AIX and IRIX timestamp behaviorBruce Momjian2001-02-13
| | | | | | | | | | | | | | | 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
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Fix up "Postgres-style" time interval representation when fields haveThomas G. Lockhart2001-01-18
| | | | | | | | | | 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.
* Change comparisons of tm->tm_isdst from "nonzero" to "greater than zero".Thomas G. Lockhart2001-01-17
| | | | | | | | | 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.
* Portability fix from Ryan Kirkpatrick's Alpha patches. I believe thisTom Lane2000-12-09
| | | | is the only diff not accounted for by fmgr rewrite...
* Ensure that all uses of <ctype.h> functions are applied to unsigned-charTom Lane2000-12-03
| | | | | values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
* USE_POSIX_TIME replaced by HAVE_TM_ZONE || HAVE_INT_TIMEZONE, which arePeter Eisentraut2000-10-29
| | | | | | | | equivalent. In linux.h there were some #undef HAVE_INT_TIMEZONE, which are useless because HAVE_TM_ZONE overrides it anyway, and messing with configure results isn't cool.
* Standardize on __CYGWIN__ rather than __CYGWIN32__ macro. Doesn't matterPeter Eisentraut2000-09-29
| | | | | either way (although the former is preferred by the Cygwin folks themselves), but using only one seems nicer.
* Remove <values.h> inclusions, no-longer-needed MAXINT definitions.Tom Lane2000-07-28
|
* Remove a bunch of unused configure tests, in particular cases wherePeter Eisentraut2000-07-12
| | | | | | | | | | * 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).
* TOASTJan Wieck2000-07-03
| | | | | | | | WARNING: This is actually broken - we have self-deadlocks due to concurrent changes in buffer management. Vadim and me are working on it. Jan
* Tamotsu Nakagawa has posted a fix for this to a local mail list inBruce Momjian2000-06-27
| | | | | | | Japan. Can someone comment on this? According to him, with the patch now only the geometry test fails. Tatsuo Ishii
* Another round of updates for new fmgr, mostly in the datetime code.Tom Lane2000-06-09
|
* Repair problems with overrun of timezone name length. Increase MAXTZLENTom Lane2000-05-29
| | | | | | to 10, and be consistent about whether it counts the trailing null (it does not). Also increase MAXDATELEN to be sure no buffer overflows are caused by the longer MAXTZLEN.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Implement "date/time grand unification".Thomas G. Lockhart2000-02-16
| | | | | | | | | | | | | 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.
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Fixed all elog related warnings, as well as a few others.Peter Eisentraut2000-01-15
|
* Remove DATEDEBUG because it didn't look Y2K safe, and fix timestamp elogBruce Momjian2000-01-02
| | | | to be Y2K safe.
* Hi,Bruce Momjian1999-12-09
| | | | | | | | | | | | | | | | I was able to crash postgres 6.5.3 when I did an 'alter user' command. After I started a debugger I found the problem in the timezone handling of datetime (my Linux box lost its timezone information, that's how the problem occurred). Only 7 bytes are reserved for the timezone, without checking for boundaries. Attached is a patch that fixes this problem and emits a NOTICE if a timezone is encountered that is longer than MAXTZLEN bytes, like this: Jeroen van Vianen
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Final cleanupBruce Momjian1999-07-16
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-15
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-15
|
* Cleanup of /include #include's, for 6.6 only.Bruce Momjian1999-07-14
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* Fix from Yutaka Tanida <yutaka@marin.or.jp> for Cygwin32 support.Tatsuo Ishii1999-04-26
|
* From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier1999-02-21
| | | | | | Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef NOT_USED" for current. I have tested these patches in that the postgres binaries are identical.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-13
|
* Change ordering of HAVE_TM_ZONE and HAVE_INT_TIMEZONE code blocksThomas G. Lockhart1998-12-31
| | | | | | | | to give HAVE_TM_ZONE priority. This fixes glibc2 machines and any other machine which passes both tests in configure. Repair HAVE_TM_ZONE code which stuffs tm structure with date type values. Same problems as were originally there before v6.1, but never noticed. Thanks to Oleg for nagging :)
* Oops, sorry...meant to commit the patch from Thomas for tzn->CTZNameMarc G. Fournier1998-12-15
|
* tzn undeclared in FreeBSD, commented out.Vadim B. Mikheev1998-12-15
|
* more cleanups...of note, appendStringInfo now performs like sprintf(),Marc G. Fournier1998-12-14
| | | | | | | | | | where you state a format and arguments. the old behavior required each appendStringInfo to have to have a sprintf() before it if any formatting was required. Also shortened several instances where there were multiple appendStringInfo() calls in a row, doing nothing more then adding one more word to the String, instead of doing them all in one call.
* Switch around conditional code so that HAVE_TM_ZONE takes precedenceThomas G. Lockhart1998-12-13
| | | | | | | over HAVE_INT_TIMEZONE. This may help out linux/glibc2 and Dec Alpha. Included #error precompiler macros to catch cases where neither is defined but USE_POSIX_TIME is (shouldn't happen). Hopefully this isn't just a gcc-ism.
* Make functions static or ifdef NOT_USED. Prevent pg_version creation.Bruce Momjian1998-10-08
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-01
|
* Remove unneeded strcpy() of timezone.Bruce Momjian1998-07-19
|
* Remove un-needed braces around single statements.Bruce Momjian1998-06-15
|
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-26
|