Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ts_get_now_internal to use transaction time #2235

Merged
merged 1 commit into from Aug 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/utils.c
Expand Up @@ -759,14 +759,14 @@ ts_get_now_internal(const Dimension *open_dim)
#ifdef TS_DEBUG
Datum now_datum;
if (ts_current_timestamp_mock == NULL || strlen(ts_current_timestamp_mock) == 0)
now_datum = TimestampTzGetDatum(GetCurrentTimestamp());
now_datum = TimestampTzGetDatum(GetCurrentTransactionStartTimestamp());
else
now_datum = DirectFunctionCall3(timestamptz_in,
CStringGetDatum(ts_current_timestamp_mock),
0,
Int32GetDatum(-1));
#else
Datum now_datum = TimestampTzGetDatum(GetCurrentTimestamp());
Datum now_datum = TimestampTzGetDatum(GetCurrentTransactionStartTimestamp());
#endif
Assert(IS_TIMESTAMP_TYPE(dim_post_part_type));

Expand Down