pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Lister <john.lister@kickstone.com>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Andrew Chernow <ac@esilo.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Array types
Date: Tue, 07 Apr 2009 20:54:28 +0100
Message-ID: <49DBAF74.5020409@kickstone.com> (raw)
In-Reply-To: <b42b73150904071244k35c139d5la58d064b31f2a32@mail.gmail.com>
References: <89DBB5874E89413698A8E275E5E79154@squarepi.com>
	<49DBA65B.9020706@esilo.com>
	<BF6DDFB5B0B346AC94F9683EC6339E73@squarepi.com>
	<b42b73150904071244k35c139d5la58d064b31f2a32@mail.gmail.com>

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.lister-ps@kickstone.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
>   



view thread (23+ messages)  latest in thread

Message-ID: <49DBAF74.5020409@kickstone.com>
Permalink:  ../49DBAF74.5020409@kickstone.com/
Also on:    postgresql.org/message-id/49DBAF74.5020409@kickstone.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: john.lister@kickstone.com, mmoncure@gmail.com, ac@esilo.com
  Subject: Re: Array types
  In-Reply-To: <49DBAF74.5020409@kickstone.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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