Re: Question about how to handle numeric (decimal) data types while using libpq
В списке pgsql-general по дате отправления:
| От | Peter Eisentraut |
|---|---|
| Тема | Re: Question about how to handle numeric (decimal) data types while using libpq |
| Дата | |
| Msg-id | e3edc85a-3b03-8564-439b-01509b47d637@enterprisedb.com обсуждение |
| Ответ на | Question about how to handle numeric (decimal) data types while using libpq (Sudheer H R <sudheer.hr@tekenlight.com>) |
| Список | pgsql-general |
On 06.07.21 13:04, Sudheer H R wrote: > I am trying to use libpq for interfacing with PostgreSQL from a C/C++ based application. > > I have tried to use binary format of data for both sending and receiving data to and from server (resultFormat = 1). > > As I understand most binary types, int, float etc… are encoded in bing-endian byte order and they can be converted to appropriatehost specific memory representations. > > However NUMERIC datatype is a more complex structure with multiple ints and pointers. > > I would like to know if there are published library functions that convert (to and from) NUMERIC field to say, long doubledatatype There is a third-party library called libpqtypes out there that adds support for handling specific types on the libpq side. But I'm not sure how up to date it is.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера