Re: CStringGetTextDatum and other conversions in server-side code

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: CStringGetTextDatum and other conversions in server-side code
Дата
Msg-id 56D7D66F.1050005@hogranch.com
обсуждение исходный текст
Ответ на Re: CStringGetTextDatum and other conversions in server-side code  (<david@andl.org>)
Ответы Re: CStringGetTextDatum and other conversions in server-side code  (<david@andl.org>)
Re: CStringGetTextDatum and other conversions in server-side code  ("David Bennett" <davidb@pfxcorp.com>)
Список pgsql-general
On 3/2/2016 9:36 PM, david@andl.org wrote:
> [dmb>] This is fairly easy for ints and reals, but is particularly a problem for all the variable length types (eg
text,time and decimal). 

all the text types are simply a 32bit length and an array of
characters.   you need to be aware of the encoding, and null is just
another character.

single and double real/floats are stored in standard x86 IEEE floating
point.

the date and time types are all fixed lengths, mostly a long int or two.

numeric in postgres is a bit tricky.  its a decimal number stored in
base 10000 as a series of short integers, and can represent.   does your
language even have a decimal or BCD or something numeric type?



--
john r pierce, recycling bits in santa cruz



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

Предыдущее
От:
Дата:
Сообщение: Re: CStringGetTextDatum and other conversions in server-side code
Следующее
От: Johnny Morano
Дата:
Сообщение: Re: bloated postgres data folder, clean up