From: | Dmitry Igrishin <dmitigr(at)gmail(dot)com> |
---|---|
To: | Sudheer H R <sudheer(dot)hr(at)tekenlight(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Question about how to handle numeric (decimal) data types while using libpq |
Date: | 2021-07-06 11:48:45 |
Message-ID: | CAAfz9KNXJM=hr1nmauQ9=dt281qYuo4L5-JCOL3H8ch6930yMw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jul 6, 2021, 14:04 Sudheer H R <sudheer(dot)hr(at)tekenlight(dot)com> wrote:
> Hello,
>
> 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 appropriate host
> 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 double datatype
>
>
> Any pointers in this regard is appreciated.
>
Why not just use text format for NUMERIC?
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sudheer H R | 2021-07-06 12:02:33 | Re: Question about how to handle numeric (decimal) data types while using libpq |
Previous Message | Sudheer H R | 2021-07-06 11:04:43 | Question about how to handle numeric (decimal) data types while using libpq |