From: Tom Lane <tgl@sss.pgh.pa.us>
To: Markus Schaber <schabi@logix-tt.com>
Cc: Louise Catherine <r1c4n@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Field length ??
Date: Thu, 20 Apr 2006 10:27:09 -0400
Message-ID: <18166.1145543229@sss.pgh.pa.us> (raw)
In-Reply-To: <4447515C.5070601@logix-tt.com>
References: <20060420060838.46274.qmail@web33403.mail.mud.yahoo.com>
<4447515C.5070601@logix-tt.com>
Markus Schaber <schabi@logix-tt.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, schabi@logix-tt.com, r1c4n@yahoo.com
Subject: Re: Field length ??
In-Reply-To: <18166.1145543229@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox