Skip to content

Commit 4fa25b8

Browse files
author
Thomas G. Lockhart
committed
Shorten routine names to <= 16 characters to fit in pg_proc table.
1 parent c0087c9 commit 4fa25b8

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

src/backend/utils/adt/timestamp.c

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,13 @@ timestampge(time_t t1, time_t t2)
103103
}
104104

105105
DateTime *
106-
timestamp_datetime(time_t timestamp)
106+
stamp_datetime(time_t timestamp)
107107
{
108-
DateTime *result;
108+
return(abstime_datetime((AbsoluteTime) timestamp));
109+
} /* stamp_datetime() */
109110

110-
double fsec = 0;
111-
struct tm *tm;
112-
113-
if (!PointerIsValid(result = PALLOCTYPE(DateTime)))
114-
elog(WARN, "Memory allocation failed, can't convert timestamp to datetime", NULL);
115-
116-
tm = localtime((time_t *) &timestamp);
117-
tm->tm_year += 1900;
118-
tm->tm_mon += 1;
119-
120-
if (tm2datetime(tm, fsec, NULL, result) != 0)
121-
elog(WARN, "Unable to convert timestamp to datetime", timestamp_out(timestamp));
122-
123-
return (result);
124-
} /* timestamp_datetime() */
111+
time_t
112+
datetime_stamp(DateTime *datetime)
113+
{
114+
return((AbsoluteTime) datetime_abstime(datetime));
115+
} /* datetime_stamp() */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy