pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Binary cursors and arrays
3+ messages / 3 participants
[nested] [flat]

* Binary cursors and arrays
@ 1999-01-28 22:39 Alessandro Baldoni <abaldoni@csr.unibo.it>
  0 siblings, 0 replies; 3+ messages in thread

From: Alessandro Baldoni @ 1999-01-28 22:39 UTC (permalink / raw)
  To: pgsql-interfaces

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Binary cursors and arrays
@ 2002-11-11 14:54 Llew <leo.goodstadt@anat.ox.ac.uk>
  0 siblings, 0 replies; 3+ messages in thread

From: Llew @ 2002-11-11 14:54 UTC (permalink / raw)
  To: pgsql-interfaces

I am trying to retrieve data using a binary cursor using libpq but I cannot
seem to find where the data is stored:

I execute the following

create temp table t_1( a integer[]);
copy t_1 from stdin;
{8}
\.
begin;
declare c_1 binary cursor from select * from t_1;
fetch from c_1;

The first four bytes seem to show the dimensions of the array. How do I get
at the data>
Thanks
Leo





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Binary cursors and arrays
@ 2002-11-11 15:09 postgres@lg.ndirect.co.uk
  0 siblings, 0 replies; 3+ messages in thread

From: postgres@lg.ndirect.co.uk @ 2002-11-11 15:09 UTC (permalink / raw)
  To: pgsql-interfaces

I am trying to retrieve data using a binary cursor using libpq but I
cannot
seem to find where the data is stored:

I execute the following

create temp table t_1( a integer[]);
copy t_1 from stdin;
{8}
\.
begin;
declare c_1 binary cursor from select * from t_1;
fetch from c_1;

The first four bytes seem to show the dimensions of the array. How do I
get
at the data>
Thanks
Leo




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-11-11 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-28 22:39 Binary cursors and arrays Alessandro Baldoni <abaldoni@csr.unibo.it>
2002-11-11 14:54 Binary cursors and arrays Llew <leo.goodstadt@anat.ox.ac.uk>
2002-11-11 15:09 Binary cursors and arrays postgres@lg.ndirect.co.uk

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox