X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 7EE2911F6095 for ; Thu, 20 Apr 2006 11:27:28 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.125 X-Spam-Level: X-Spam-Status: No, score=0.125 required=5 tests=[AWL=0.125] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id sktpOt74TdhH for ; Thu, 20 Apr 2006 11:27:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 68AB411F6296 for ; Thu, 20 Apr 2006 11:27:13 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3KER90b018167; Thu, 20 Apr 2006 10:27:09 -0400 (EDT) To: Markus Schaber cc: Louise Catherine , pgsql-sql@postgresql.org Subject: Re: Field length ?? In-reply-to: <4447515C.5070601@logix-tt.com> References: <20060420060838.46274.qmail@web33403.mail.mud.yahoo.com> <4447515C.5070601@logix-tt.com> Comments: In-reply-to Markus Schaber message dated "Thu, 20 Apr 2006 11:16:12 +0200" Date: Thu, 20 Apr 2006 10:27:09 -0400 Message-ID: <18166.1145543229@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/138 X-Sequence-Number: 24947 Markus Schaber 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