Re: Array types

Поиск
Список
Период
Сортировка
От Andrew Chernow
Тема Re: Array types
Дата
Msg-id 49DBA65B.9020706@esilo.com
обсуждение исходный текст
Ответ на Array types  ("John Lister" <john.lister-ps@kickstone.com>)
Список pgsql-hackers
John Lister wrote:
> They all return arrays as text, is it possible to configure postgresql 
> to return an array in native form (does postgresql support such a 
> thing)? This is using both the simple and extended query forms - i 
> couldn't see a way to say what return type i wanted in the protocol docs...
>  

You need libpqtypes (client-side library).  It requires a new 8.4 
feature called libpq-events, but there is an 8.3 patch available.  If 
you willing to patch your 8.3.5 libpq client, than this should meet your 
needs.

Downloads: http://pgfoundry.org/projects/libpqtypes/
Documentation: http://libpqtypes.esilo.com/

For arrays, libpqtypes gives you a PGresult where each tuple is an array 
item.  For composite arrays, each composite field is a PGresult field.

> This would seem much better in terms of performance, both size and 
> speed(conversion).
>  

That is true.  Our testing has proven this.  It also reduces the overall 
coding effort.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Array types
Следующее
От: "John Lister"
Дата:
Сообщение: Re: Array types