Brian Hurt <bhurt@janestcapital.com> writes:
> That said, it looks like they're doing a variant of my #2- they're
> holding 5 decimal digits every 2 bytes, plus an extra byte or so for the
> sign.
Four digits per 2 bytes, actually ... five wouldn't fit (99999 > 65535).
> But consider the NumericVar structure defined in numeric.c- is
> one of those stored with every row of a table,
NumericVar is just a transient calculational representation.
NumericData (in numeric.h) is what's stored in the database. So it's
basically 8 bytes overhead plus 2 bytes for each group of 4 decimal
digits.
regards, tom lane