df7cb / pg_filedump

pg_filedump provides facilities for low-level examination of PostgreSQL tables and indexes
43 stars 18 forks source link

Fix incorrect oid #19

Closed alexandervpotapov closed 1 year ago

alexandervpotapov commented 1 year ago

oid greater than 2147483647 is shown incorrectly. It happens because the function decode_int() calls CopyAppendFmt("%d", (int32 ) buffer), it should be CopyAppendFmt("%u", (uint32 ) buffer).

This is related to https://github.com/df7cb/pg_filedump/issues/18

df7cb commented 1 year ago

Hi,

thanks for spotting that problem!

I just pushed a fix - yours would unfortunately break decoding normal integers.

alexandervpotapov commented 1 year ago

You are right, I see you've already added new function to support unsigned integers, that looks much better )