diff options
author | Alvaro Herrera | 2011-02-25 22:04:25 +0000 |
---|---|---|
committer | Alvaro Herrera | 2011-02-25 22:04:25 +0000 |
commit | a338d654614f897ccb58eaa8a6171abdb7dc8dff (patch) | |
tree | 9a73fbd759eb81398b07eb1ba0cc36529fa40d60 /contrib/pageinspect/heapfuncs.c | |
parent | 79ad8fc5f857ed38057f482fc022bf157175c4d8 (diff) |
Fix pageinspect's heap_page_item to return infomasks as 32 bit values
HeapTupleHeader's t_infomask and t_infomask2 are defined as 16-bit
unsigned integers, so when the 16th bit was set, heap_page_item was
returning them as negative values, which was ugly.
The change to pageinspect--unpackaged--1.0.sql allows a module upgraded
from 9.0 to be cleanly updated from the previous definition.
Diffstat (limited to 'contrib/pageinspect/heapfuncs.c')
-rw-r--r-- | contrib/pageinspect/heapfuncs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pageinspect/heapfuncs.c b/contrib/pageinspect/heapfuncs.c index 49a2f911200..20bca0dc539 100644 --- a/contrib/pageinspect/heapfuncs.c +++ b/contrib/pageinspect/heapfuncs.c @@ -170,8 +170,8 @@ heap_page_items(PG_FUNCTION_ARGS) values[5] = UInt32GetDatum(HeapTupleHeaderGetXmax(tuphdr)); values[6] = UInt32GetDatum(HeapTupleHeaderGetRawCommandId(tuphdr)); /* shared with xvac */ values[7] = PointerGetDatum(&tuphdr->t_ctid); - values[8] = UInt16GetDatum(tuphdr->t_infomask2); - values[9] = UInt16GetDatum(tuphdr->t_infomask); + values[8] = UInt32GetDatum(tuphdr->t_infomask2); + values[9] = UInt32GetDatum(tuphdr->t_infomask); values[10] = UInt8GetDatum(tuphdr->t_hoff); /* |