Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4fa25b8c
Commit
4fa25b8c
authored
Oct 25, 1997
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shorten routine names to <= 16 characters to fit in pg_proc table.
parent
c0087c9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
17 deletions
+8
-17
src/backend/utils/adt/timestamp.c
src/backend/utils/adt/timestamp.c
+8
-17
No files found.
src/backend/utils/adt/timestamp.c
View file @
4fa25b8c
...
...
@@ -103,22 +103,13 @@ timestampge(time_t t1, time_t t2)
}
DateTime
*
time
stamp_datetime
(
time_t
timestamp
)
stamp_datetime
(
time_t
timestamp
)
{
DateTime
*
result
;
return
(
abstime_datetime
((
AbsoluteTime
)
timestamp
));
}
/* stamp_datetime() */
double
fsec
=
0
;
struct
tm
*
tm
;
if
(
!
PointerIsValid
(
result
=
PALLOCTYPE
(
DateTime
)))
elog
(
WARN
,
"Memory allocation failed, can't convert timestamp to datetime"
,
NULL
);
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() */
time_t
datetime_stamp
(
DateTime
*
datetime
)
{
return
((
AbsoluteTime
)
datetime_abstime
(
datetime
));
}
/* datetime_stamp() */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment