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

Commit e847f81

Browse files
author
Nikita Glukhov
committed
Add .datetime() jsonpath item method
1 parent 27562c9 commit e847f81

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] = {
@@ -1939,7 +1936,7 @@ time_part(PG_FUNCTION_ARGS)
19391936
/* tm2timetz()
19401937
* Convert a tm structure to a time data type.
19411938
*/
1942-
static int
1939+
int
19431940
tm2timetz(struct pg_tm *tm, fsec_t fsec, int tz, TimeTzADT *result)
19441941
{
19451942
result->time = ((((tm->tm_hour * MINS_PER_HOUR + tm->tm_min) * SECS_PER_MINUTE) + tm->tm_sec) *

0 commit comments

Comments
 (0)