Search Postgresql Archives

semi-variable length type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to make a float(n) type that emulates the mssql float type. The storage requirements are documented as 4 bytes for 1 <= 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 byte storage).

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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux