| От | Jeroen Vermeulen |
|---|---|
| Тема | Re: Retrieving points, arrays, ... with libpq |
| Дата | |
| Msg-id | 48FEB9C0.7030608@xs4all.nl обсуждение исходный текст |
| Ответ на | Retrieving points, arrays, ... with libpq (<Georges.Brefort@sanofi-aventis.com>) |
| Список | pgsql-interfaces |
Georges.Brefort@sanofi-aventis.com wrote: > I have read the most recent documentation from the first to the very > last line, and I guess I can retreive data of any type with the > PQgetValue() function, something like: > > char* chunkOfMemory = PQgetvalue( (const PGresult*) myresult, > row_number, column_number); > > But then, is it possible to cast the char* pointer to some meaningfull C > structure if column_number relates to some datatype other than text or > integer ? By default, you get your data in a textual representation. So you need to parse the string that that char* points to. (It's also possible to work in binary mode, but then you've got a lot more worries about portability and such for not much gain in speed.) Jeroen
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера