Re: Field length ??

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Field length ??
Дата
Msg-id 18166.1145543229@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Field length ??  (Markus Schaber <schabi@logix-tt.com>)
Список pgsql-sql
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


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

Предыдущее
От: "John Goss"
Дата:
Сообщение: At time zone madness!
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: ask syntax sql to get length of field