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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: dmitry(at)koterov(dot)ru
Cc: Sam Mason <sam(at)samason(dot)me(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fast ALTER TABLE ... ADD COLUMN ... DEFAULT xxx?
Date: 2009-05-24 18:48:19
Message-ID: 27198.1243190899@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dmitry Koterov <dmitry(at)koterov(dot)ru> writes:
> No, I meant that in case of the row (1, NULL, NULL, 2, 3, NULL):
> - the corresponding NULL bitmap is (100110...)
> - the corresponding tuple is (1, 2, 3)
> - t_natts=3 (if I am not wrong here)

You are wrong --- t_natts would be six here. In general the length of
the null bitmap in a tuple (if it has one at all) is always exactly
equal to its t_natts value.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-05-24 18:57:59 Re: generic options for explain
Previous Message Tom Lane 2009-05-24 16:42:18 Re: Oracle to Postgres : create type as object in Postgres