nazgul@punkass.spam (nazgul) writes:
> Hi, I'm wondering how much storage space a NULL value takes up?
None.
However, as soon as you have any NULLs in a particular table row, the
row needs to store a NULL-value bitmap, which has one bit per table
column to show which ones are nulls. So you could say that the first
NULL in a given row costs you 4 bytes (more if you have > 32 columns).
Additional NULLs in the row are free.
regards, tom lane
PS: if you're on a machine where MAXALIGN is 8, the cost quantum is
8 bytes not 4. But I think it's usually 4 on peecee hardware.