semi-variable length type

Поиск
Список
Период
Сортировка
От James Harper
Тема semi-variable length type
Дата
Msg-id 6035A0D088A63A46850C3988ED045A4B6F3AE0D1@BITCOM1.int.sbss.com.au
обсуждение исходный текст
Ответы Re: semi-variable length type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I want to make a float(n) type that emulates the mssql float type. The storage requirements are documented as 4 bytes
for1 <= n <=24, and 8 bytes for 25 <= n <= 53. If I understand correctly, my options for emulating this in postgres
are:

1. declare as variable length. Storage is then 8 bytes (4 byte length + 4 byte storage), or 12 bytes (4 byte length + 8
bytestorage). 

2. declare as fixed 8 byte length.

In the absence of some magical 3rd option, I assume #2 is the best way forward... can anyone confirm?

Thanks

James


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

Предыдущее
От: mark_2014
Дата:
Сообщение: table "db1.public.a" and all behind "db1.public.a" tables did not do analyzing
Следующее
От: Tom Lane
Дата:
Сообщение: Re: semi-variable length type