Re: unsigned types

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: unsigned types
Дата
Msg-id 1129658457.8219.59.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: unsigned types  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: unsigned types  (Martijn van Oosterhout <kleptog@svana.org>)
Re: unsigned types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, 2005-17-10 at 12:25 -0500, Jim C. Nasby wrote:
> So, if you have a bunch of int2's all next to each other in a table,
> they will happily just consume 2 bytes. The issue comes when you try
> and mix them with other fields randomly, since many other fields
> require int alignment.

We could improve on this by reordering fields on-disk to reduce
alignment/padding requirements, during CREATE TABLE. We'd need to be
sure to present the same column order back to the client application, of
course, but that should be possible. The notion of a "physical column
number" (on-disk position of the column) as well as a "logical column
numer" (position of the column in the table -- e.g. in SELECT *
expansion) would also make it easy to implement column reordering in
ALTER TABLE, which has been requested a few times.

-Neil



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

Предыдущее
От: "Onyx"
Дата:
Сообщение: Re: About postgreSQL database Synchorization
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: unsigned types