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

From Tom Lane
Subject Re: Number of attributes in HeapTupleHeader
Date
Msg-id 24616.1020649704@sss.pgh.pa.us
Whole thread Raw
In response to Re: Number of attributes in HeapTupleHeader  (Neil Conway <nconway@klamath.dyndns.org>)
List pgsql-hackers
Neil Conway <nconway@klamath.dyndns.org> writes:
> IMHO, the current ADD COLUMN mechanism is a hack. Besides requiring
> redundant on-disk data (t_natts), it isn't SQL compliant (because
> default values or NOT NULL can't be specified), and depends on
> a low-level kludge (that the storage system will return NULL for
> any attnums > the # of the attributes stored in the tuple).

It could be improved if anyone felt like working on it.

Hint: instead of returning NULL for col > t_natts, you could instead
return whatever default value is specified for the column... at least
for the case of a constant default, which is the main thing people
are interested in IMHO.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: HEADS UP: Win32/OS2/BeOS native ports
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: HEADS UP: Win32/OS2/BeOS native ports