Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit243a913

Browse files
author
Thomas G. Lockhart
committed
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.
1 parent9d99dac commit243a913

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

‎contrib/unixdate/unixdate.sql

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
-- unixdate
22
-- Routines to convert int4 (Unix system time) to datetime
3-
-- and int4 (delta time) to timespan
3+
-- and int4 (delta time in seconds) to timespan
44
--
55
-- Thomas Lockhart (lockhart@alumni.caltech.edu)
66
-- 1997-11-25
77
--
88
-- This cheats and reuses existing code in the standard package.
99
-- Can not include this directly because built-in functions are optimized
1010
-- into a cache and the duplicate function names abstime_datetime() and
11-
-- reltime_timespan() result in duplicate constants.
11+
-- reltime_timespan()wouldresult in duplicate constants.
1212
--
1313
-- This works with Postgres v6.2 and higher.
1414

@@ -32,23 +32,3 @@ CREATE FUNCTION timespan(int4)
3232
RETURNS timespan
3333
AS'select reltime_timespan($1)' LANGUAGE'SQL';
3434

35-
--
36-
-- Conversions back to integer
37-
--
38-
39-
CREATEFUNCTIONdatetime_abstime(datetime)
40-
RETURNS int4
41-
AS'-' LANGUAGE'internal';
42-
43-
CREATEFUNCTIONutime(datetime)
44-
RETURNS int4
45-
AS'select datetime_abstime($1)' LANGUAGE'SQL';
46-
47-
CREATEFUNCTIONtimespan_reltime(timespan)
48-
RETURNS int4
49-
AS'-' LANGUAGE'internal';
50-
51-
CREATEFUNCTIONuspan(timespan)
52-
RETURNS int4
53-
AS'select timespan_reltime($1)' LANGUAGE'SQL';
54-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp