Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 055f699

Browse files
author
Nikita Glukhov
committed
Add .datetime() jsonpath item method
1 parent b8e9dfb commit 055f699

File tree

13 files changed

+1246
-37
lines changed

13 files changed

+1246
-37
lines changed

src/backend/utils/adt/date.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343

4444
static int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec);
4545
static int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp);
46-
static int tm2time(struct pg_tm *tm, fsec_t fsec, TimeADT *result);
47-
static int tm2timetz(struct pg_tm *tm, fsec_t fsec, int tz, TimeTzADT *result);
48-
static void AdjustTimeForTypmod(TimeADT *time, int32 typmod);
4946

5047

5148
/* common code for timetypmodin and timetztypmodin */
@@ -1234,7 +1231,7 @@ time_in(PG_FUNCTION_ARGS)
12341231
/* tm2time()
12351232
* Convert a tm structure to a time data type.
12361233
*/
1237-
static int
1234+
int
12381235
tm2time(struct pg_tm *tm, fsec_t fsec, TimeADT *result)
12391236
{
12401237
*result = ((((tm->tm_hour * MINS_PER_HOUR + tm->tm_min) * SECS_PER_MINUTE) + tm->tm_sec)
@@ -1400,7 +1397,7 @@ time_scale(PG_FUNCTION_ARGS)
14001397
* have a fundamental tie together but rather a coincidence of
14011398
* implementation. - thomas
14021399
*/
1403-
static void
1400+
void
14041401
AdjustTimeForTypmod(TimeADT *time, int32 typmod)
14051402
{
14061403
static const int64 TimeScales[MAX_TIME_PRECISION + 1] = {
@@ -1933,7 +1930,7 @@ time_part(PG_FUNCTION_ARGS)
19331930
/* tm2timetz()
19341931
* Convert a tm structure to a time data type.
19351932
*/
1936-
static int
1933+
int
19371934
tm2timetz(struct pg_tm *tm, fsec_t fsec, int tz, TimeTzADT *result)
19381935
{
19391936
result->time = ((((tm->tm_hour * MINS_PER_HOUR + tm->tm_min) * SECS_PER_MINUTE) + tm->tm_sec) *

0 commit comments

Comments
 (0)