Commit 4fa25b8c authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Shorten routine names to <= 16 characters to fit in pg_proc table.

parent c0087c9f
...@@ -103,22 +103,13 @@ timestampge(time_t t1, time_t t2) ...@@ -103,22 +103,13 @@ timestampge(time_t t1, time_t t2)
} }
DateTime * DateTime *
timestamp_datetime(time_t timestamp) stamp_datetime(time_t timestamp)
{ {
DateTime *result; return(abstime_datetime((AbsoluteTime) timestamp));
} /* stamp_datetime() */
double fsec = 0; time_t
struct tm *tm; datetime_stamp(DateTime *datetime)
{
if (!PointerIsValid(result = PALLOCTYPE(DateTime))) return((AbsoluteTime) datetime_abstime(datetime));
elog(WARN, "Memory allocation failed, can't convert timestamp to datetime", NULL); } /* datetime_stamp() */
tm = localtime((time_t *) &timestamp);
tm->tm_year += 1900;
tm->tm_mon += 1;
if (tm2datetime(tm, fsec, NULL, result) != 0)
elog(WARN, "Unable to convert timestamp to datetime", timestamp_out(timestamp));
return (result);
} /* timestamp_datetime() */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment