Re: Field length ??

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Field length ??
Дата
Msg-id 4447515C.5070601@logix-tt.com
обсуждение исходный текст
Ответ на Re: Field length ??  (Louise Catherine <r1c4n@yahoo.com>)
Ответы Re: Field length ??  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Field length ??  (Frank Bax <fbax@sympatico.ca>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Mariya Yuniarti
Дата:
Сообщение: ask syntax sql to get length of field
Следующее
От: "Florian Reiser"
Дата:
Сообщение: Re: Moving around in a SQL database