Re: Custom Type Alignment

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Custom Type Alignment
Дата
Msg-id 22330.1229809660@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Custom Type Alignment  ("Paul Ramsey" <pramsey@cleverelephant.ca>)
Список pgsql-general
"Paul Ramsey" <pramsey@cleverelephant.ca> writes:
> Simple question on CREATE TYPE (I hope):
> When using the "alignment" option, and setting it to "double", what
> ends up double aligned? VARDATA()? The whole thing datum (so that the
> alignment of VARDATA() is actually conditioned on the size of
> VARHDRSZ) ?

No, the value as a whole.  If you're talking about a varlena-format
value then the length word will start on a double boundary, and you'll
have to waste a word of alignment padding if the data payload has to
start on a double boundary.

            regards, tom lane

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

Предыдущее
От: "Paul Ramsey"
Дата:
Сообщение: Custom Type Alignment
Следующее
От: Gerhard Heift
Дата:
Сообщение: infinity interval