@@ -530,7 +530,6 @@ timestamptz_recv(PG_FUNCTION_ARGS)
530530struct pg_tm tt ,
531531 * tm = & tt ;
532532fsec_t fsec ;
533- char * tzn ;
534533
535534#ifdef HAVE_INT64_TIMESTAMP
536535timestamp = (TimestampTz ) pq_getmsgint64 (buf );
@@ -541,7 +540,7 @@ timestamptz_recv(PG_FUNCTION_ARGS)
541540/* rangecheck: see if timestamptz_out would like it */
542541if (TIMESTAMP_NOT_FINITE (timestamp ))
543542 /* ok */ ;
544- else if (timestamp2tm (timestamp , & tz , tm , & fsec , & tzn , NULL ) != 0 )
543+ else if (timestamp2tm (timestamp , & tz , tm , & fsec , NULL , NULL ) != 0 )
545544ereport (ERROR ,
546545(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
547546 errmsg ("timestamp out of range" )));
@@ -2723,7 +2722,6 @@ timestamptz_pl_interval(PG_FUNCTION_ARGS)
27232722Interval * span = PG_GETARG_INTERVAL_P (1 );
27242723TimestampTz result ;
27252724int tz ;
2726- char * tzn ;
27272725
27282726if (TIMESTAMP_NOT_FINITE (timestamp ))
27292727result = timestamp ;
@@ -2735,7 +2733,7 @@ timestamptz_pl_interval(PG_FUNCTION_ARGS)
27352733 * tm = & tt ;
27362734fsec_t fsec ;
27372735
2738- if (timestamp2tm (timestamp , & tz , tm , & fsec , & tzn , NULL ) != 0 )
2736+ if (timestamp2tm (timestamp , & tz , tm , & fsec , NULL , NULL ) != 0 )
27392737ereport (ERROR ,
27402738(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
27412739 errmsg ("timestamp out of range" )));
@@ -2771,7 +2769,7 @@ timestamptz_pl_interval(PG_FUNCTION_ARGS)
27712769fsec_t fsec ;
27722770int julian ;
27732771
2774- if (timestamp2tm (timestamp , & tz , tm , & fsec , & tzn , NULL ) != 0 )
2772+ if (timestamp2tm (timestamp , & tz , tm , & fsec , NULL , NULL ) != 0 )
27752773ereport (ERROR ,
27762774(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
27772775 errmsg ("timestamp out of range" )));
@@ -3250,12 +3248,11 @@ timestamptz_age(PG_FUNCTION_ARGS)
32503248 * tm2 = & tt2 ;
32513249int tz1 ;
32523250int tz2 ;
3253- char * tzn ;
32543251
32553252result = (Interval * ) palloc (sizeof (Interval ));
32563253
3257- if (timestamp2tm (dt1 , & tz1 , tm1 , & fsec1 , & tzn , NULL ) == 0 &&
3258- timestamp2tm (dt2 , & tz2 , tm2 , & fsec2 , & tzn , NULL ) == 0 )
3254+ if (timestamp2tm (dt1 , & tz1 , tm1 , & fsec1 , NULL , NULL ) == 0 &&
3255+ timestamp2tm (dt2 , & tz2 , tm2 , & fsec2 , NULL , NULL ) == 0 )
32593256{
32603257/* form the symbolic difference */
32613258fsec = fsec1 - fsec2 ;
@@ -3509,7 +3506,6 @@ timestamptz_trunc(PG_FUNCTION_ARGS)
35093506bool redotz = false;
35103507char * lowunits ;
35113508fsec_t fsec ;
3512- char * tzn ;
35133509struct pg_tm tt ,
35143510 * tm = & tt ;
35153511
@@ -3524,7 +3520,7 @@ timestamptz_trunc(PG_FUNCTION_ARGS)
35243520
35253521if (type == UNITS )
35263522{
3527- if (timestamp2tm (timestamp , & tz , tm , & fsec , & tzn , NULL ) != 0 )
3523+ if (timestamp2tm (timestamp , & tz , tm , & fsec , NULL , NULL ) != 0 )
35283524ereport (ERROR ,
35293525(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
35303526 errmsg ("timestamp out of range" )));
@@ -4159,7 +4155,6 @@ timestamptz_part(PG_FUNCTION_ARGS)
41594155char * lowunits ;
41604156double dummy ;
41614157fsec_t fsec ;
4162- char * tzn ;
41634158struct pg_tm tt ,
41644159 * tm = & tt ;
41654160
@@ -4179,7 +4174,7 @@ timestamptz_part(PG_FUNCTION_ARGS)
41794174
41804175if (type == UNITS )
41814176{
4182- if (timestamp2tm (timestamp , & tz , tm , & fsec , & tzn , NULL ) != 0 )
4177+ if (timestamp2tm (timestamp , & tz , tm , & fsec , NULL , NULL ) != 0 )
41834178ereport (ERROR ,
41844179(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
41854180 errmsg ("timestamp out of range" )));
@@ -4319,7 +4314,7 @@ timestamptz_part(PG_FUNCTION_ARGS)
43194314
43204315case DTK_DOW :
43214316case DTK_ISODOW :
4322- if (timestamp2tm (timestamp , & tz , tm , & fsec , & tzn , NULL ) != 0 )
4317+ if (timestamp2tm (timestamp , & tz , tm , & fsec , NULL , NULL ) != 0 )
43234318ereport (ERROR ,
43244319(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
43254320 errmsg ("timestamp out of range" )));
@@ -4329,7 +4324,7 @@ timestamptz_part(PG_FUNCTION_ARGS)
43294324break ;
43304325
43314326case DTK_DOY :
4332- if (timestamp2tm (timestamp , & tz , tm , & fsec , & tzn , NULL ) != 0 )
4327+ if (timestamp2tm (timestamp , & tz , tm , & fsec , NULL , NULL ) != 0 )
43334328ereport (ERROR ,
43344329(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
43354330 errmsg ("timestamp out of range" )));
@@ -4650,14 +4645,13 @@ timestamptz_timestamp(PG_FUNCTION_ARGS)
46504645struct pg_tm tt ,
46514646 * tm = & tt ;
46524647fsec_t fsec ;
4653- char * tzn ;
46544648int tz ;
46554649
46564650if (TIMESTAMP_NOT_FINITE (timestamp ))
46574651result = timestamp ;
46584652else
46594653{
4660- if (timestamp2tm (timestamp , & tz , tm , & fsec , & tzn , NULL ) != 0 )
4654+ if (timestamp2tm (timestamp , & tz , tm , & fsec , NULL , NULL ) != 0 )
46614655ereport (ERROR ,
46624656(errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
46634657 errmsg ("timestamp out of range" )));
0 commit comments