Re: [HACKERS] Tuple size - Mailing list pgsql-hackers

From Steve A Fink
Subject Re: [HACKERS] Tuple size
Date
Msg-id bebd562b647d10a3d10b812abd432958
Whole thread Raw
In response to [HACKERS] Tuple size  (Alexander Demenshin <aldem@techie.com>)
List pgsql-hackers
I can take a guess...

>   Well, I understand why, but type 'char' is *fixed* length type,
>   so even if I don't use some attributes, it *must* be inserted
>   with all spaces... At least, I expected this... In this case
>   I must get "tuple is too big" even if I will insert "empty"
>   record. It is not so - why?

Your first insertion had nulls for the other two positions. Tuples are
stored with a bit vector specifying which columns are null. Null columns
are not stored. So the example fit into one page, no problem. If you had
inserted empty strings in the other two char()s, then you would have run
out of space.

------------------------------

pgsql-hackers by date:

Previous
From: (Erik Bennett)
Date:
Subject: [HACKERS] rules
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Tuple size