libpq, binary cursors, & arrays

Поиск
Список
Период
Сортировка
От Cody Pisto
Тема libpq, binary cursors, & arrays
Дата
Msg-id 4095F70A.9040402@hpcs.com
обсуждение исходный текст
Список pgsql-hackers
Hi all,

I'm putting together a small package of macros and functions
to help deal with binary cursor results from libpq, but I've run into a 
bit of a stumbling block with regard to array results,

for example:
 ArrayType *arr; uint64_t *lin;
 ...
res = PQexecParams(conn, "select '{1,2,3}'::bigint[]", 1, NULL,                       paramValues, NULL, NULL, 1); ...
 arr = (ArrayType *)PQgetvalue(res, 0, 1); lin = (uint64_t *)ARR_DATA_PTR(lin); printf("%lld\n", lin[0]);
 does not produce the expected results


Any pointers would be much appreciated,

Thanks in advance,

---
Cody Pisto <cody@hpcs.com>


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Fixed directory locations in installs
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Fixed directory locations in installs