summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/date.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove a bunch of unused configure tests, in particular cases wherePeter Eisentraut2000-07-121-3/+1
| | | | | | | | | | * 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).
* Clean up bogosities in pg_opclass, pg_amop, pg_amproc. There are amprocTom Lane2000-06-191-5/+25
| | | | | | | entries now for int8 and network hash indexes. int24_ops and int42_ops are gone. pg_opclass no longer contains multiple entries claiming to be the default opclass for the same datatype. opr_sanity regress test extended to catch errors like these in the future.
* Final #include cleanup.Bruce Momjian2000-06-151-3/+1
|
* Clean up #include's.Bruce Momjian2000-06-151-2/+6
|
* Another round of updates for new fmgr, mostly in the datetime code.Tom Lane2000-06-091-332/+381
|
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-121-36/+30
|
* Implement column aliases on views "CREATE VIEW name (collist)".Thomas G. Lockhart2000-03-141-17/+319
| | | | | | | | | | | | | | | | | | 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.
* All regression tests pass except for rules.sql (unrelated).Thomas G. Lockhart2000-02-161-1105/+361
| | | | | | | | | | | | | | Implement "date/time grand unification". 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-261-2/+3
| | | | | | * 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-151-3/+3
|
* Remove DATEDEBUG because it didn't look Y2K safe, and fix timestamp elogBruce Momjian2000-01-021-10/+1
| | | | to be Y2K safe.
* values.h patch from Alex HowanskyBruce Momjian1999-09-211-1/+8
|
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-171-3/+1
|
* Final cleanup.Bruce Momjian1999-07-161-2/+3
|
* Update #include cleanupsBruce Momjian1999-07-161-2/+2
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-151-3/+1
|
* Cleanup of /include #include's, for 6.6 only.Bruce Momjian1999-07-141-1/+2
|
* pgindent run over code.Bruce Momjian1999-05-251-1/+2
|
* Attempting to insert a value of 'now' into a datetime typeBruce Momjian1999-03-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | results in a bogus datetime value under AlphaLinux. (Note that the link to submit a port-specific bug on your website is broken) -Test Case: ---------- testdb=> create table dttest (dt datetime); testdb=> insert into dttest values ('now'); -------------------------------------------------------------------------- Solution: --------- The basic problem is the typedefs of AbsoluteTime and RelativeTime, which are both 'int32'. These types appear to be used synonymously with the 'time_t' type, which on AlphaLinux is typedef'd as a 'long int', which is 64-bits (not 32). The solution included here fixes the datetime type (it now passes the regression test), but does not pass the absolute and relative time regression tests. Presumably, a more thorough investigation of how these types are used is warranted. The included patch is from the v6.3.2 source, but can be applied to the v6.4.2 source. Please note that there is also a RedHat-specific patch distributed with the PostgreSQL source package from RedHat that was applied first. Rich Edwards
* From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier1999-02-211-5/+5
| | | | | | 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-131-2/+2
|
* Make functions static or ifdef NOT_USED. Prevent pg_version creation.Bruce Momjian1998-10-081-1/+3
|
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-011-130/+129
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-011-86/+86
|
* Fix macros that were not properly surrounded by parens or braces.Bruce Momjian1998-06-151-3/+6
|
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-261-40/+58
|
* Goodbye register keyword. Compiler knows better.Bruce Momjian1998-02-111-6/+6
|
* Allow varchar() to only store needed bytes. Remove PALLOC,PALLOCTYPE,PFREE. ↵Bruce Momjian1998-01-071-3/+3
| | | | Clean up use of VARDATA.
* Change some ABORTS to ERROR. Add line number when COPY Failure.Bruce Momjian1998-01-051-6/+6
|
* Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian1998-01-051-6/+6
|
* Include tinterval comparison functions for span of interval.Thomas G. Lockhart1997-09-201-5/+206
|
* Used modified version of indent that understands over 100 typedefs.Bruce Momjian1997-09-081-3/+3
|
* Add typdefs to pgindent run.Bruce Momjian1997-09-081-5/+5
|
* Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian1997-09-081-100/+100
| | | | indenting. Also static variable indenting.
* Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian1997-09-071-657/+764
|
* Cleanups needed for indent. Remove };Bruce Momjian1997-09-051-7/+7
|
* Make functions static where possible, enclose unused functions in #ifdef ↵Bruce Momjian1997-08-191-3/+3
| | | | NOT_USED.
* Remove more (void) and fix -Wall warnings.Bruce Momjian1997-08-121-3/+3
|
* Fix pgproc names over 15 chars in output. Add strNcpy() function. remove ↵Bruce Momjian1997-08-121-9/+9
| | | | some (void) casts that are unnecessary.
* Update some reltime code to use new common routines.Thomas G. Lockhart1997-07-291-33/+103
| | | | Use standard decoder for isreltime().
* Here is the Mismatched input/output patch for tintervals as reported overMarc G. Fournier1997-04-201-4/+4
| | | | | | | the last week on Hackers...(A coulpe of clippings of the final verdict are included below + the diff). From: Wayde Nie <niew@phoenix.cis.mcmaster.ca>
* needs float.h for DBL_MIN under FreeBSDMarc G. Fournier1997-04-041-1/+4
|
* From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>Marc G. Fournier1997-04-021-5/+53
| | | | | | | | | | | | | | | | | | | | | | | | | Subject: [HACKERS] More date time functions Here are some additional patches mostly related to the date and time data types. It includes some type conversion routines to move between the different date types and some other date manipulation routines such as date_part(units,datetime). I noticed Edmund Mergl et al's neat trick for getting function overloading for builtin functions, so started to use that for the date and time stuff. Later, if someone figures out how to get function overloading directly for internal C code, then we can move to that technique. These patches include documentation updates (don't faint!) for the built-in man page. Doesn't yet include mention of timestamp, since I don't know much about it and since it may change a bit to become a _real_ ANSI timestamp which would include parser support for the declaration syntax (what do you think, Dan?). The patches were developed on the 970330 release, but have been rebuilt off of the 970402 release. The first patch below is to get libpq to compile, on my Linux box, but is not related to the rest of the patches and you can choose not to apply that one at this time. Thanks in advance, scrappy!
* Date/Time updates from Thomas...Marc G. Fournier1997-03-141-82/+61
|
* Remove WIN32 defines. They never worked.Bruce Momjian1997-02-141-9/+1
|
* All external function definitions now have prototypes that are checked.Bruce Momjian1996-11-101-2/+2
|
* Another directory that compiles with no errors, and few warningsMarc G. Fournier1996-11-061-7/+1
|
* Some compile failure fixes from Keith Parks <emkxp01@mtcc.demon.co.uk>Marc G. Fournier1996-11-061-3/+1
|
* Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier1996-07-091-0/+891