diff options
author | Thomas G. Lockhart | 1998-02-11 04:24:20 +0000 |
---|---|---|
committer | Thomas G. Lockhart | 1998-02-11 04:24:20 +0000 |
commit | 243a9137666717fc239beb4c79dbe6c0b294057b (patch) | |
tree | 802c7e8b59bb83dc8e0487cfa6392a4a80e3e1a1 /contrib/unixdate | |
parent | 9d99dacd081e31cd1e2efe222c60056d70ee7654 (diff) |
Remove some definitions which could not work; conversions from datetime
to integer unix system time conflict on the input types.
Leave in the conversions from integer unix system time to datetime.
Diffstat (limited to 'contrib/unixdate')
-rw-r--r-- | contrib/unixdate/unixdate.sql | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/contrib/unixdate/unixdate.sql b/contrib/unixdate/unixdate.sql index 6ee0bd83cbb..c78403ba6bb 100644 --- a/contrib/unixdate/unixdate.sql +++ b/contrib/unixdate/unixdate.sql @@ -1,6 +1,6 @@ -- unixdate -- Routines to convert int4 (Unix system time) to datetime --- and int4 (delta time) to timespan +-- and int4 (delta time in seconds) to timespan -- -- Thomas Lockhart (lockhart@alumni.caltech.edu) -- 1997-11-25 @@ -8,7 +8,7 @@ -- This cheats and reuses existing code in the standard package. -- Can not include this directly because built-in functions are optimized -- into a cache and the duplicate function names abstime_datetime() and --- reltime_timespan() result in duplicate constants. +-- reltime_timespan() would result in duplicate constants. -- -- This works with Postgres v6.2 and higher. @@ -32,23 +32,3 @@ CREATE FUNCTION timespan(int4) RETURNS timespan AS 'select reltime_timespan($1)' LANGUAGE 'SQL'; --- --- Conversions back to integer --- - -CREATE FUNCTION datetime_abstime(datetime) - RETURNS int4 - AS '-' LANGUAGE 'internal'; - -CREATE FUNCTION utime(datetime) - RETURNS int4 - AS 'select datetime_abstime($1)' LANGUAGE 'SQL'; - -CREATE FUNCTION timespan_reltime(timespan) - RETURNS int4 - AS '-' LANGUAGE 'internal'; - -CREATE FUNCTION uspan(timespan) - RETURNS int4 - AS 'select timespan_reltime($1)' LANGUAGE 'SQL'; - |