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

From Steve A Fink
Subject Re: [HACKERS] Tuple size
Date
Msg-id 58559d6794c6995f62da9953bf536b1a
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: David Friend
Date:
Subject: Re: [HACKERS] Third Party Stuff
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] 6.1 jumbo patch?