Re: Array handling in libpq

From: "Joris van Zwieten" <vanzwieten(at)stcorp(dot)nl>
To: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
Cc: "Bruce Momjian" <bruce(at)momjian(dot)us>, vanzwieten(at)stcorp(dot)nl, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Array handling in libpq
Date: 2007-01-17 08:45:09
Message-ID: 54258.192.87.1.229.1169023509.squirrel@control.prolocation.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi Bruce, Jeroen,

Thanks for your replies. This is good to know, although one worry remains
and that is loss of precision in the conversion of double to string. But
this could probably always be solved by using enough digits in the
conversion, right?

I did do some tests to see what an array received in binary format looks
like, and the format is quite easy. But I'd rather not depend on it too
much, as it's Postgres internal and could probably change in future
versions.

Jeroen: Yes, I would certainly be willing to test new code. I think it
would be nice if one could interact with libpqxx in terms of some array
type (vector?, C-style pointer?, ..?) and it would perform the conversion
to/from strings automatically.

On Wed, January 17, 2007 7:49 am, Jeroen T. Vermeulen wrote:
> On Wed, January 17, 2007 10:46, Bruce Momjian wrote:
>
>>
>> Condsidering all the processing required by the query, the conversion
>> and number of bytes sent over the nework really don't affect performance.
>>
>
> Bruce, I'm glad to hear this from someone more experienced. A lot of
> people request support for transmitting binary data in libpqxx, which would
> take a lot of work, but there's very little hard evidence that it would
> make things noticeably better.
>
> Joris: yes, I'm afraid there's no array support in libpqxx yet so you'll
> have to do the conversion yourself. I may have some time to work on this
> in the coming days. Would you be willing to test-drive new code?
>
>
> Jeroen
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
>
> http://www.postgresql.org/about/donate
>
>

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2007-01-17 15:46:17 Re: Array handling in libpq
Previous Message Jeroen T. Vermeulen 2007-01-17 06:49:53 Re: Array handling in libpq