mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
pg_buffercache: Fix incorrect result cast for relforknumber
pg_buffercache_pages.relforknumber is defined as an int2, but its value was stored with ObjectIdGetDatum() rather than Int16GetDatum() in the result record. Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://postgr.es/m/CAExHW5s2_qwSdhKpVnUzjRMf0cf1PvmhUHQDLaFM3QzKbP1OyQ@mail.gmail.com
This commit is contained in:
@@ -263,7 +263,7 @@ pg_buffercache_pages(PG_FUNCTION_ARGS)
|
||||
nulls[2] = false;
|
||||
values[3] = ObjectIdGetDatum(fctx->record[i].reldatabase);
|
||||
nulls[3] = false;
|
||||
values[4] = ObjectIdGetDatum(fctx->record[i].forknum);
|
||||
values[4] = Int16GetDatum(fctx->record[i].forknum);
|
||||
nulls[4] = false;
|
||||
values[5] = Int64GetDatum((int64) fctx->record[i].blocknum);
|
||||
nulls[5] = false;
|
||||
|
||||
Reference in New Issue
Block a user