Bruce Momjian
07842084fe
pgindent run over code.
1999-05-25 16:15:34 +00:00
Tom Lane
c422e1a93d
Fix compile failures in dt.c --- line broken in middle of
...
an identifier :-(. Sloppy transmission of a patch, likely.
1999-05-01 17:14:56 +00:00
Tatsuo Ishii
89c7369d0e
Fix from Yutaka Tanida <yutaka@marin.or.jp> for Cygwin32 support.
1999-04-26 04:42:49 +00:00
Thomas G. Lockhart
b2b3d5d184
Fix code to check legal dates *before* calling localtime() to get the
...
time zone.
Previously, localtime() rotated a date with a day of month field which
exceeded the actual range into the next months, masking the fact that
a bad date had been specified.
Regression tests pass.
1999-04-15 02:22:39 +00:00
Bruce Momjian
3ea6c806eb
cleanup
1999-03-20 02:31:45 +00:00
Bruce Momjian
aba8c12f67
We have tested the patches on three platforms:
...
NetBSD/macppc
LinuxPPC
FreeBSD 2.2.6-RELEASE
All of them seem happy with the regression test. Note that, however,
compiling with optimization enabled on NetBSD/macppc causes an initdb
failure (other two platforms are ok). After checking the asm code, we
are suspecting that might be a compiler(egcs) bug.
Tatsuo Ishii
1999-03-14 16:03:33 +00:00
Bruce Momjian
6724a50787
Change my-function-name-- to my_function_name, and optimizer renames.
1999-02-13 23:22:53 +00:00
Thomas G. Lockhart
8c3fff7337
Fix offset of one for date_part(timespan) when given arguments of
...
decade, century, or millenium.
1999-02-13 05:34:24 +00:00
Thomas G. Lockhart
a97683bc6c
Change #if FALSE to #if NOT_USED to avoid port problems.
...
Fix problem with date_part() for timespan (had an offset of one)
when given decade, century, and millenium as arguments.
Reported by Ricardo J.C.Coelho.
1999-02-13 04:25:01 +00:00
Thomas G. Lockhart
1ace93c46c
Fix "Y-2K" problem with two-digit BC dates being corrected by two millenia.
...
They are not corrected now.
Allow the date type to accept BC dates.
Share more date/time validation declarations through dt.h.
1999-01-20 16:29:39 +00:00
Thomas G. Lockhart
6d5d673ca8
Be more careful to check input string lengths as well as values
...
when deciding whether a field is a year field. Assume *anything* longer
than 2 digits (if it isn't a special-case doy) is a valid year.
This should fix the "Y1K" and "Y10K" problems
pointed out by Massimo recently.
Check usage of BC to require a positive-valued year; before just used it
to flip the sign of the year without checking. This led to problems
near year zero.
Allow a 5 digit "concatenated date" of 2 digit year plus day of year.
Do 2->4 digit year correction for 6 and 5 digit "concatenated dates".
Somehow forgot this originally. Guess not many folks use it...
1999-01-10 17:20:54 +00:00
Thomas G. Lockhart
4d56dbd678
Change ordering of HAVE_TM_ZONE and HAVE_INT_TIMEZONE code blocks
...
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 :)
1998-12-31 16:30:59 +00:00
Bruce Momjian
173c555948
Make functions static or ifdef NOT_USED. Prevent pg_version creation.
1998-10-08 18:30:52 +00:00
Bruce Momjian
31fea9777f
Fix for datetime from Tatsuo Ishii
1998-09-23 17:51:46 +00:00
Bruce Momjian
fa1a8d6a97
OK, folks, here is the pgindent output.
1998-09-01 04:40:42 +00:00
Bruce Momjian
af74855a60
Renaming cleanup, no pgindent yet.
1998-09-01 03:29:17 +00:00
Bruce Momjian
6bd323c6b3
Remove un-needed braces around single statements.
1998-06-15 19:30:31 +00:00
Bruce Momjian
27db9ecd0b
Fix macros that were not properly surrounded by parens or braces.
1998-06-15 18:40:05 +00:00
Thomas G. Lockhart
8e602a3cb7
Define "tz_hour" and "tz_minute" arguments to date_part().
...
Fix up "ISO-style" timespan decoding and encoding.
1998-05-09 22:38:18 +00:00
Bruce Momjian
a32450a585
pgindent run before 6.3 release, with Thomas' requested changes.
1998-02-26 04:46:47 +00:00
Bruce Momjian
24cab6bd0d
Goodbye register keyword. Compiler knows better.
1998-02-11 19:14:04 +00:00
Bruce Momjian
e6c6146eb8
Allow varchar() to only store needed bytes. Remove PALLOC,PALLOCTYPE,PFREE. Clean up use of VARDATA.
1998-01-07 18:47:07 +00:00
Bruce Momjian
deea69b90e
Change some ABORTS to ERROR. Add line number when COPY Failure.
1998-01-05 16:40:20 +00:00
Bruce Momjian
0d9fc5afd6
Change elog(WARN) to elog(ERROR) and elog(ABORT).
1998-01-05 03:35:55 +00:00
Thomas G. Lockhart
ca23837ade
Fix format to produce actual German style. Affects new "GERMAN" feature only.
1997-12-23 19:26:31 +00:00
Thomas G. Lockhart
d451a3b3bc
Enable timespan_finite() and text_timespan() routines (was commented out).
...
Define an "ISO-style" timespan output format with "hh:mm:ss" fields.
Enabled by DateStyle = USE_ISO_DATES.
1997-12-17 23:22:17 +00:00
Thomas G. Lockhart
352b36877f
Add 'GERMAN' style to date/time output.
...
Probably have it wrong (dd.mm/yyyy) but can change it when we know.
Input routines always handled it.
1997-12-04 23:30:52 +00:00
Thomas G. Lockhart
e7946a53ad
Allow fractional values for delta times (e.g. '2.5 days').
...
Check valid numeric input more carefully for delta times.
Implement day of year as possible input to datetime_part().
1997-11-17 16:23:33 +00:00
Thomas G. Lockhart
2c1557a2ff
Fix occasional uninitialized variable fractional seconds
...
in DecodeTimeOnly(). Only present when seconds are not specified
for input.
1997-10-25 05:18:17 +00:00
Thomas G. Lockhart
9c800b8e48
Fix delta time decoding for 12 AM/PM.
1997-10-17 05:36:01 +00:00
Thomas G. Lockhart
cc8dc825d8
Fix typo for default units for timespan input.
...
Place single-ticks around bad argument in elog messages.
Fix tabbing of large lookup tables (ugh).
1997-09-20 16:20:29 +00:00
Bruce Momjian
59f6a57e59
Used modified version of indent that understands over 100 typedefs.
1997-09-08 21:56:23 +00:00
Bruce Momjian
319dbfa736
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
1997-09-08 02:41:22 +00:00
Bruce Momjian
1ccd423235
Massive commit to run PGINDENT on all *.c and *.h files.
1997-09-07 05:04:48 +00:00
Bruce Momjian
268b8be814
Cleanup needed for indent.
1997-09-06 00:22:44 +00:00
Bruce Momjian
a1635450b3
Cleanups needed for indent. Remove };
1997-09-05 18:13:45 +00:00
Thomas G. Lockhart
7c243f83e8
Add comparision routines and catalog entries to support indices on
...
datetime and timespan.
1997-09-04 18:43:59 +00:00
Thomas G. Lockhart
98462b73f8
Shift time zone to GMT to correctly evaluate "current" time.
1997-09-01 06:13:21 +00:00
Bruce Momjian
0ab2921290
Change time function names to be more consistent, and check for zero divides, from Michael Reifenberg.
1997-08-21 23:57:00 +00:00
Bruce Momjian
1d8bbfd2e7
Make functions static where possible, enclose unused functions in #ifdef NOT_USED.
1997-08-19 21:40:56 +00:00
Thomas G. Lockhart
d95c93bf99
Fix bug to allow hh:mm:ss time entry for timespan/reltime types.
1997-07-29 16:09:38 +00:00
Bruce Momjian
8d25436d70
mkLinux patches from Tatsuo Ishii.
1997-07-29 14:09:11 +00:00
Bruce Momjian
3ac9d2fff3
Various compile errors concerning overflow due to shifts, unsigned, and bad prototypes, from Solaris, from Diab Jerius
1997-07-24 20:19:10 +00:00
Bruce Momjian
a5d80cb0cf
Date-type fixes from Tatsuo Ishii
1997-07-08 22:06:46 +00:00
Thomas G. Lockhart
8507ddb9c6
Use common parser and encoder for timestamp data type.
...
Remove older date and time code (retain NEW_DATE_CODE and NEW_TIME_CODE).
Use common encoder for date and time.
Fix datetime +/- timespan math bug.
1997-07-01 00:22:46 +00:00
Thomas G. Lockhart
01264e84ba
Modify EncodeDateTime() to suppress trailing ".00" in seconds field.
...
This matches the behavior of the original formatting for abstime.
Repair datetime + timespan date arithmetic for year boundaries.
From patch submitted by Dave Skinner.
1997-06-23 14:50:56 +00:00
Thomas G. Lockhart
3cef45d330
Fix leap year and month boundary arithmetic for datetime +/- timespan;
...
the problem only manifests itself when adding years/months and hours
when the hours:minutes:seconds pushes over midnight.
Fix interpretation of times with explicit timezone when the timezone is
in daylight savings time and is not the default timezone.
Allow interpretation of explicit timezone when it is specified as two words:
<standard time> DST". For example, "MET DST" (Middle European Time Daylight
Savings Time). This syntax is found in the zic package on Linux boxes at least.
1997-06-20 17:12:54 +00:00
Vadim B. Mikheev
fa940fda67
cc1: warnings being treated as errors
...
dt.c: In function `timespan2tm':
dt.c:1722: warning: unused variable `funit'
dt.c:1722: warning: unused variable `iunit'
-> got rid of them.
1997-06-03 06:32:56 +00:00
Thomas G. Lockhart
43b6f1e678
Clean up support for USE_POSIX_TIME, ! HAVE_INT_TIMEZONE machines.
...
Remove references to modf() which is buggy on some platforms (Sparc/Linux).
1997-05-30 15:02:51 +00:00
Thomas G. Lockhart
ac534bee01
Clean up redundant tests for valid pointers in geometric types.
...
Fix up decoder field masks for timespan and reltime.
1997-05-23 05:24:53 +00:00