Re: Number of attributes in HeapTupleHeader

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Rod Taylor <rbt(at)zort(dot)ca>
Cc: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, mkoi-pg(at)aon(dot)at, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Number of attributes in HeapTupleHeader
Date: 2002-05-07 02:07:32
Message-ID: 3CD736E4.D07A2686@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Inoue
http://w2422.nsk.ne.jp/~inoue/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark kirkwood 2002-05-07 06:20:51 Unbounded (Possibly) Database Size Increase - Test Case
Previous Message Christopher Kings-Lynne 2002-05-07 01:55:02 Re: Set Returning Functions (SRF) - request for patch review and comment