Re: Field length ??

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Schaber <schabi(at)logix-tt(dot)com>
Cc: Louise Catherine <r1c4n(at)yahoo(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Field length ??
Date: 2006-04-20 14:27:09
Message-ID: 18166.1145543229@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Frank Bax 2006-04-20 15:21:27 Re: Field length ??
Previous Message John Goss 2006-04-20 13:31:20 At time zone madness!