*tm = &tt;
fsec_t fsec;
int tz;
- char *tzn;
if (TIMESTAMP_IS_NOBEGIN(timestamp))
DATE_NOBEGIN(result);
DATE_NOEND(result);
else
{
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
*tm = &tt;
int tz;
fsec_t fsec;
- char *tzn;
if (TIMESTAMP_NOT_FINITE(timestamp))
PG_RETURN_NULL();
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
*tm = &tt;
int tz;
fsec_t fsec;
- char *tzn;
if (TIMESTAMP_NOT_FINITE(timestamp))
PG_RETURN_NULL();
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
struct pg_tm tt,
*tm = &tt;
fsec_t fsec;
- char *tzn;
#ifdef HAVE_INT64_TIMESTAMP
timestamp = (TimestampTz) pq_getmsgint64(buf);
/* rangecheck: see if timestamptz_out would like it */
if (TIMESTAMP_NOT_FINITE(timestamp))
/* ok */ ;
- else if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ else if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
Interval *span = PG_GETARG_INTERVAL_P(1);
TimestampTz result;
int tz;
- char *tzn;
if (TIMESTAMP_NOT_FINITE(timestamp))
result = timestamp;
*tm = &tt;
fsec_t fsec;
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
fsec_t fsec;
int julian;
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
*tm2 = &tt2;
int tz1;
int tz2;
- char *tzn;
result = (Interval *) palloc(sizeof(Interval));
- if (timestamp2tm(dt1, &tz1, tm1, &fsec1, &tzn, NULL) == 0 &&
- timestamp2tm(dt2, &tz2, tm2, &fsec2, &tzn, NULL) == 0)
+ if (timestamp2tm(dt1, &tz1, tm1, &fsec1, NULL, NULL) == 0 &&
+ timestamp2tm(dt2, &tz2, tm2, &fsec2, NULL, NULL) == 0)
{
/* form the symbolic difference */
fsec = fsec1 - fsec2;
bool redotz = false;
char *lowunits;
fsec_t fsec;
- char *tzn;
struct pg_tm tt,
*tm = &tt;
if (type == UNITS)
{
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
char *lowunits;
double dummy;
fsec_t fsec;
- char *tzn;
struct pg_tm tt,
*tm = &tt;
if (type == UNITS)
{
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
case DTK_DOW:
case DTK_ISODOW:
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
break;
case DTK_DOY:
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));
struct pg_tm tt,
*tm = &tt;
fsec_t fsec;
- char *tzn;
int tz;
if (TIMESTAMP_NOT_FINITE(timestamp))
result = timestamp;
else
{
- if (timestamp2tm(timestamp, &tz, tm, &fsec, &tzn, NULL) != 0)
+ if (timestamp2tm(timestamp, &tz, tm, &fsec, NULL, NULL) != 0)
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
errmsg("timestamp out of range")));