Markus Schaber <schabi(at)logix-tt(dot)com> writes:
> Louise Catherine wrote:
>> Could anyone explain, why the field length must be add by 4 :
> I guess that it is because all variable length datatypes (and text types
> are such) internally contain a 4 bytes length field.
It's an ancient decision that no longer has much of anything to do with
reality, but changing it would break more code than it's worth to have
a slightly cleaner definition of atttypmod ...
regards, tom lane