libpq, binary cursors, & arrays - Mailing list pgsql-hackers

From Cody Pisto
Subject libpq, binary cursors, & arrays
Date
Msg-id 4095F70A.9040402@hpcs.com
Whole thread Raw
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Fixed directory locations in installs
Next
From: "Magnus Hagander"
Date:
Subject: Re: Fixed directory locations in installs