Re: Fast ALTER TABLE ... ADD COLUMN ... DEFAULT xxx?

Поиск
Список
Период
Сортировка
От Dmitry Koterov
Тема Re: Fast ALTER TABLE ... ADD COLUMN ... DEFAULT xxx?
Дата
Msg-id d7df81620905280916t6975c1a1l83d512227987dae8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fast ALTER TABLE ... ADD COLUMN ... DEFAULT xxx?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt
0pt0pt 0.8ex; padding-left: 1ex;"><div class="im">Dmitry Koterov <<a
href="mailto:dmitry@koterov.ru">dmitry@koterov.ru</a>>writes:<br /> > No, I meant that in case of the row (1,
NULL,NULL, 2, 3, NULL):<br /> > - the corresponding NULL bitmap is (100110...)<br /> > - the corresponding tuple
is(1, 2, 3)<br /> > - t_natts=3 (if I am not wrong here)<br /><br /></div>You are wrong --- t_natts would be six
here. In general the length of<br /> the null bitmap in a tuple (if it has one at all) is always exactly<br /> equal to
itst_natts value.<br /></blockquote></div><br />And so, the real number of values in the tuple - (1, 2, 3) above - is
equalto the number of 1-bits in NULL bitmap. And the size of NULL bitmap is held in t_natts. I meant that when I said
"thanksto NULL bitmap, adding a new nullable column is cheap". :-) And, of course, thanks to t_natts
(HeapTupleHeaderGetNattsmacro) - too.<br /><br /> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Markus Wanner"
Дата:
Сообщение: Re: PostgreSQL Developer meeting minutes up
Следующее
От: Guillaume Smet
Дата:
Сообщение: Re: Clean shutdown and warm standby