pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Schaber <schabi@logix-tt.com>
To: Louise Catherine <r1c4n@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Field length ??
Date: Thu, 20 Apr 2006 11:16:12 +0200
Message-ID: <4447515C.5070601@logix-tt.com> (raw)
In-Reply-To: <20060420060838.46274.qmail@web33403.mail.mud.yahoo.com>
References: <20060420060838.46274.qmail@web33403.mail.mud.yahoo.com>

Hi, Louise,

Louise Catherine wrote:

> Could anyone explain, why the field length must be add by 4 :
> result 1 : 10 + 4 =14
> result 2 : 5 + 4 = 9

I guess that it is because all variable length datatypes (and text types
are such) internally contain a 4 bytes length field.

http://www.postgresql.org/docs/8.1/interactive/xtypes.html might be a
start if you want to read more on this topic.

HTH,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



view thread (7+ messages)  latest in thread

Message-ID: <4447515C.5070601@logix-tt.com>
Permalink:  ../4447515C.5070601@logix-tt.com/
Also on:    postgresql.org/message-id/4447515C.5070601@logix-tt.com

 · 

reply

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: schabi@logix-tt.com, r1c4n@yahoo.com
  Subject: Re: Field length ??
  In-Reply-To: <4447515C.5070601@logix-tt.com>

* 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