Re: Array types

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Array types
Дата
Msg-id b42b73150904071244k35c139d5la58d064b31f2a32@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Array types  ("John Lister" <john.lister-ps@kickstone.com>)
Ответы Re: Array types  (John Lister <john.lister@kickstone.com>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Update PL interpreters for 8.4
Следующее
От: Werner Echezuria
Дата:
Сообщение: Re: Sort a column that does not exist