Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0BA9D9FA435 for ; Wed, 17 Jan 2007 04:45:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 97442-01 for ; Wed, 17 Jan 2007 04:45:15 -0400 (AST) X-Greylist: delayed 09:32:02.142594 by SQLgrey-1.7.4 Received: from vmx03.prolocation.net (vmx03.prolocation.net [81.23.230.33]) by postgresql.org (Postfix) with ESMTP id 7B4A89FA31C for ; Wed, 17 Jan 2007 04:45:17 -0400 (AST) Received: from noc.prolocation.net ([81.23.230.64] helo=control.prolocation.net) by vmx03.prolocation.net with esmtp (Exim 4.62) (envelope-from ) id 1H76Pu-0006rs-4R; Wed, 17 Jan 2007 09:45:10 +0100 Received: from dop29.nfra.nl ([192.87.1.229]) (SquirrelMail authenticated user usr01873) by control.prolocation.net with HTTP; Wed, 17 Jan 2007 09:45:09 +0100 (CET) Message-ID: <54258.192.87.1.229.1169023509.squirrel@control.prolocation.net> In-Reply-To: <5050.125.24.240.25.1169016593.squirrel@webmail.xs4all.nl> References: <200701170346.l0H3kBd23330@momjian.us> <5050.125.24.240.25.1169016593.squirrel@webmail.xs4all.nl> Date: Wed, 17 Jan 2007 09:45:09 +0100 (CET) Subject: Re: Array handling in libpq From: "Joris van Zwieten" To: "Jeroen T. Vermeulen" Cc: "Bruce Momjian" , vanzwieten@stcorp.nl, pgsql-interfaces@postgresql.org Reply-To: vanzwieten@stcorp.nl User-Agent: SquirrelMail/1.5.2 [CVS] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Prolocation-MailScanner-Information: Please contact helpdesk@prolocation.net for more information X-Prolocation-MailScanner: Found to be clean X-Prolocation-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.379, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60, PROLO_LEO5 0.01, PROLO_LEO7 0.01) X-Prolocation-MailScanner-From: vanzwieten@stcorp.nl X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.5 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200701/30 X-Sequence-Number: 6408 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 > >