Gregory Stark wrote:
> a) To have two sets of macros, one of which, VARATT_DATA and
> VARATT_SIZEP are for constructing new tuples and behaves exactly as
> it does now. So you always construct a four-byte header datum. Then
> in heap_form*tuple we check if you can use a shorter header and
> convert. VARDATA/VARSIZE would be for looking at existing datums and
> would interpret the header bits.
Has any thought been given to headers *longer* than four bytes? I don't
exactly recall a flood of field reports that one gigabyte per datum is
too little, but as long as the encoding of variable length data is
changed, one might as well prepare a little for the future.
Of course, that would put a dent into any plan that wants to normalize
the header to four bytes somewhere along the way.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/