Thread: Binary cursors and arrays

Binary cursors and arrays

From
Alessandro Baldoni
Date:
Dear friends,
    I need to access the elements of a float8 array retrieved through a
binary cursor.
I first do PQexec (conn, "DECLARE B BINARY CURSOR FOR SELECT f
FROM foo"), then
FETCH ALL IN f. In a loop, I do
            foo = (ArrayType *) PQgetvalue (res, i, 0);
I know that foo has 1 dimension and 9 elements, but ARR_DATA_PTR doesn't
work.
Can someone help me?

Please reply to abaldoni@csr.unibo.it

Thanks
Alessandro