Обсуждение: pgsql: Fix pageinspect's heap_page_item to return infomasks as 32 bit v
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. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/a338d654614f897ccb58eaa8a6171abdb7dc8dff Modified Files -------------- contrib/pageinspect/heapfuncs.c | 4 ++-- .../pageinspect/pageinspect--unpackaged--1.0.sql | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-)
Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > 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. I think you forgot to commit the matching change in pageinspect--1.0.sql ? regards, tom lane
Excerpts from Tom Lane's message of vie feb 25 19:31:13 -0300 2011: > Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > > 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. > > I think you forgot to commit the matching change in pageinspect--1.0.sql ? Oops, yeah, thanks. -- Álvaro Herrera <alvherre@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support