Index: timetravel.c =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/spi/timetravel.c,v retrieving revision 1.31 diff -r1.31 timetravel.c 19d18 < #include "utils/nabstime.h" 164,165c163,164 < if (SPI_gettypeid(tupdesc, attnum[i]) != ABSTIMEOID) < elog(ERROR, "timetravel (%s): attribute %s must be of abstime type", --- > if (SPI_gettypeid(tupdesc, attnum[i]) != TIMESTAMPTZOID) > elog(ERROR, "timetravel (%s): attribute %s must be of type 'timestamp with time zone'", 193c192 < newvals[chnattrs] = GetCurrentAbsoluteTime(); --- > newvals[chnattrs] = GetCurrentTimestamp(); 202,203c201,202 < if ((chnattrs == 0 && DatumGetInt32(oldtimeon) >= NOEND_ABSTIME) || < (chnattrs > 0 && DatumGetInt32(newvals[a_time_on]) >= NOEND_ABSTIME)) --- > if ((chnattrs == 0 && timestamptz_cmp_internal(DatumGetTimestampTz(oldtimeon), DT_NOEND) >= 0) || > (chnattrs > 0 && timestamptz_cmp_internal(DatumGetTimestampTz(newvals[a_time_on]), DT_NOEND) >= 0)) 205c204 < newvals[chnattrs] = NOEND_ABSTIME; --- > newvals[chnattrs] = DT_NOEND; 212,213c211,212 < if ((chnattrs == 0 && DatumGetInt32(oldtimeon) > DatumGetInt32(oldtimeoff)) || < (chnattrs > 0 && DatumGetInt32(newvals[a_time_on]) > DatumGetInt32(oldtimeoff))) --- > if ((chnattrs == 0 && timestamptz_cmp_internal(DatumGetTimestampTz(oldtimeon), DatumGetTimestampTz(oldtimeoff)) > 0) || > (chnattrs > 0 && timestamptz_cmp_internal(DatumGetTimestampTz(newvals[a_time_on]), DatumGetTimestampTz(oldtimeoff)) > 0)) 271c270 < if (oldtimeoff != NOEND_ABSTIME) --- > if (oldtimeoff != DT_NOEND) 277c276 < newtimeoff = GetCurrentAbsoluteTime(); --- > newtimeoff = GetCurrentTimestamp(); 377c376 < newvals[chnattrs] = NOEND_ABSTIME; --- > newvals[chnattrs] = DT_NOEND;