aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pgstatfuncs.c
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2020-05-13 22:20:37 +0900
committerFujii Masao <fujii@postgresql.org>2020-05-13 22:20:37 +0900
commit043e3e04016077735f986726a3a74192c295ace7 (patch)
tree0e5ebdc6d3c47118f8d8428e685993f78a5c0fe6 /src/backend/utils/adt/pgstatfuncs.c
parentf3d23d83ef9a33344391acbaa92a6235a4350791 (diff)
downloadpostgresql-043e3e04016077735f986726a3a74192c295ace7.tar.gz
postgresql-043e3e04016077735f986726a3a74192c295ace7.zip
Use proper GetDatum function in pg_stat_get_slru().
This commit changes pg_stat_get_slru() so that it uses TimestampTzGetDatum() for stats_reset field because that field stores the timestamp with time zone value. Previously Int64GetDatum() was used. Author: Fujii Masao Reviewed-by: Tomas Vondra Discussion: https://postgr.es/m/b8784fe6-1401-ab35-aa14-d57b5bb8e312@oss.nttdata.com
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
-rw-r--r--src/backend/utils/adt/pgstatfuncs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 446044609eb..6b476173282 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1757,7 +1757,7 @@ pg_stat_get_slru(PG_FUNCTION_ARGS)
values[5] = Int64GetDatum(stat.blocks_exists);
values[6] = Int64GetDatum(stat.flush);
values[7] = Int64GetDatum(stat.truncate);
- values[8] = Int64GetDatum(stat.stat_reset_timestamp);
+ values[8] = TimestampTzGetDatum(stat.stat_reset_timestamp);
tuplestore_putvalues(tupstore, tupdesc, values, nulls);
}