Re: Number of attributes in HeapTupleHeader - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: Number of attributes in HeapTupleHeader
Date
Msg-id 3CD736E4.D07A2686@tpf.co.jp
Whole thread Raw
In response to Number of attributes in HeapTupleHeader  (Manfred Koizar <mkoi-pg@aon.at>)
List pgsql-hackers
Rod Taylor wrote:
> 
> I think the real trick is keeping track of the difference between:
> 
> begin;
> ALTER TABLE tab ADD COLUMN col1 int4 DEFAULT 4;
> commit;
> 
> and
> 
> begin;
> ALTER TABLE tab ADD COLUMN col1;
> ALTER TABLE tab ALTER COLUMN col1 SET DEFAULT 4;
> commit;
> 
> The first should populate the column with the value of '4', the second
> should populate the column with NULL and have new entries with default
> of 4.

I know the difference. Though I don't love the standard
spec of the first, I don't object to introduce it.
My only anxiety is that the implementation of the first
would replace the current implementaion of ADD COLUMN
(without default) together to touch tuples.

regards,
Hiroshi Inouehttp://w2422.nsk.ne.jp/~inoue/


pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Set Returning Functions (SRF) - request for patch review and comment
Next
From: Mark kirkwood
Date:
Subject: Unbounded (Possibly) Database Size Increase - Test Case