Re: Array types

From: John Lister <john(dot)lister(at)kickstone(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Andrew Chernow <ac(at)esilo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Array types
Date: 2009-04-07 19:54:28
Message-ID: 49DBAF74.5020409@kickstone.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Cheers, nice to know it is possible... Now to see if i can get
java/python to do the same :) or to use a modified libpq somehow...

Merlin Moncure wrote:
> On Tue, Apr 7, 2009 at 3:35 PM, John Lister
> <john(dot)lister-ps(at)kickstone(dot)com> wrote:
>
>> Does libpqtypes pass the array "over the wire" as an array? Ideally i'd like
>> to do this with jdbc, but might give me a pointer...
>>
>
> We send/receive the server's array format. This is not quite a C
> array, and is definitely not a java array. It's a packed postgres
> specific (network byte order) format. It is much faster and tighter
> than text in some cases however. We present an interface to copy C
> arrays to postgres style formats such as:
>
> PGarray a;
> PQgetf(res, tuple_num, "%int4[]", field_num, &a);
>
> This will 'pop' a result out of your result that presents the array
> internals (which you could then loop).
>
> merlin
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Chernow 2009-04-07 19:59:53 Re: Array types
Previous Message Werner Echezuria 2009-04-07 19:52:57 Re: Sort a column that does not exist