Skip to content

Commit

Permalink
Fix incorrect function call
Browse files Browse the repository at this point in the history
Using DatumGetTimestampTz is requires on some 32-bit platforms under
PG 9.6.
  • Loading branch information
cevian committed Oct 30, 2018
1 parent 939acc2 commit 319933d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bgw/job_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ TimestampTz
calculate_next_start_on_success(TimestampTz last_finish, BgwJob *job)
{
/* TODO: add randomness here? Do we need a range or just a percent? */
TimestampTz ts = DirectFunctionCall2(timestamptz_pl_interval,
TimestampTzGetDatum(last_finish),
IntervalPGetDatum(&job->fd.schedule_interval));
TimestampTz ts = DatumGetTimestampTz(DirectFunctionCall2(timestamptz_pl_interval,
TimestampTzGetDatum(last_finish),
IntervalPGetDatum(&job->fd.schedule_interval)));

return ts;
}
Expand Down

0 comments on commit 319933d

Please sign in to comment.