Re: [HACKERS] Re: [DOCS] Re: FE/BE protocol revision patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Re: [DOCS] Re: FE/BE protocol revision patch
Date
Msg-id 19309.895680453@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: [DOCS] Re: FE/BE protocol revision patch  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Re: [DOCS] Re: FE/BE protocol revision patch
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> Zero overhead for types that don't use it is meaningless, because the
> varlena length is 4 bytes, while current atttypmod is only two.  Second,
> I don't see how a varlena makes atttypmod less type-specific.

Well, the issue is making sure that it will be adequate for future
datatypes that we can't foresee.

I can see that a variable-size atttypmod might be a tad painful to
support.  If you don't want to go that far, a reasonable compromise
would be to make it int4 instead of int2.  int2 is already uncomfortably
tight for the numeric/decimal datatypes, which we surely will want to
support soon (at least I do ;-)).  int4 should give a little breathing
room for datatypes that need to encode more than one subfield into
atttypmod.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [DOCS] Re: FE/BE protocol revision patch
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [DOCS] Re: FE/BE protocol revision patch