Commit 043e3e04 authored by Fujii Masao's avatar Fujii Masao

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
parent f3d23d83
...@@ -1757,7 +1757,7 @@ pg_stat_get_slru(PG_FUNCTION_ARGS) ...@@ -1757,7 +1757,7 @@ pg_stat_get_slru(PG_FUNCTION_ARGS)
values[5] = Int64GetDatum(stat.blocks_exists); values[5] = Int64GetDatum(stat.blocks_exists);
values[6] = Int64GetDatum(stat.flush); values[6] = Int64GetDatum(stat.flush);
values[7] = Int64GetDatum(stat.truncate); 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); tuplestore_putvalues(tupstore, tupdesc, values, nulls);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment