Re: alter table type from double precision to real

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: alter table type from double precision to real
Дата
Msg-id 20070625041610.GA38794@winnie.fuhr.org
обсуждение исходный текст
Ответ на alter table type from double precision to real  (ssoo@siliconfile.com)
Ответы Re: alter table type from double precision to real  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: alter table type from double precision to real  (ssoo@siliconfile.com)
Список pgsql-general
On Mon, Jun 25, 2007 at 09:51:30AM +0900, ssoo@siliconfile.com wrote:
> Real type takes 4 byte storage sizes and double precision takes 8 bytes.
> I altered a data type from double precision to real and vacuumed DB.

Altering a column's type rewrites the table so vacuuming afterward
shouldn't be necessary.

> But PostgreSQL's data disk usage did not shrinked.
> And pg_dump size remained same.
> It seems that real takes 8 byte storage sizes.

Real is 4 bytes but other columns' alignment requirements might
result in no space being saved.

--
Michael Fuhr

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

Предыдущее
От: ssoo@siliconfile.com
Дата:
Сообщение: alter table type from double precision to real
Следующее
От: Tom Lane
Дата:
Сообщение: Re: alter table type from double precision to real