Tom Lane wrote:
> 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.
Oh, I didn't realize the size of the NULL bitmask was zero if no nulls
exist. Nice.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026