Re: How can I retrieve double or int data type for libpq
В списке pgsql-general по дате отправления:
| От | Laurenz Albe |
|---|---|
| Тема | Re: How can I retrieve double or int data type for libpq |
| Дата | |
| Msg-id | 1528864191.2657.11.camel@cybertec.at обсуждение |
| Ответ на | How can I retrieve double or int data type for libpq ("a" <372660931@qq.com>) |
| Список | pgsql-general |
a wrote: > I wanna use C library to connect pgsql server and I got 2 questions: This is all well documented in https://www.postgresql.org/docs/current/static/libpq.html > 1, If I can fetch a row's data instead of using PQgetvalue? PGgetvalue *is* the way to fetch the row's data. There is no call to fetch *all* columns at once, but that is not necessary. > 2, PQgetvalue will return all data as text, I would have to convert them into the > relative data type, is there a way of getting data by its original format? You will get the data in binary form if you specify a resultFormat of 1 with PQexecParams. Note, however, that they will be in the native binary format of the *server*. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера