X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3939952B63 for ; Wed, 17 Aug 2005 04:10:59 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67448-09 for ; Wed, 17 Aug 2005 07:10:55 +0000 (GMT) Received: from pw6tiger.de (pw6tiger.de [217.160.140.116]) by svr1.postgresql.org (Postfix) with SMTP id 78AA152B5D for ; Wed, 17 Aug 2005 04:10:53 -0300 (ADT) Received: (qmail 12179 invoked by uid 505); 17 Aug 2005 07:10:54 -0000 Received: from vygen@gmx.de by planwerk6 by uid 89 with qmail-scanner-1.14 (virus scan: Clear:. Processed in 0.213349 secs); 17 Aug 2005 07:10:54 -0000 Received: from isi-dial-156-126.isionline-dialin.de (HELO jv.pw6.de) (vygen@planwerk6.de@195.158.156.126) by pw6tiger.de with SMTP; 17 Aug 2005 07:10:54 -0000 From: Janning Vygen To: pgsql-php@postgresql.org Subject: Re: How to parse data type array columns? Date: Wed, 17 Aug 2005 09:12:14 +0200 User-Agent: KMail/1.7.2 Cc: Greg Stark References: <200508161004.07400.vygen@gmx.de> <200508162025.17280.vygen@gmx.de> <873bp9ve5a.fsf@stark.xeocode.com> In-Reply-To: <873bp9ve5a.fsf@stark.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508170912.15129.vygen@gmx.de> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.048 required=5 tests=[AWL=-0.002, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/13 X-Sequence-Number: 3225 Am Dienstag, 16. August 2005 22:08 schrieb Greg Stark: > Janning Vygen writes: > > What kind of "binary format" do you mean? anyway: In PHP you get it as a > > string and i wonder if anyone has written a small pasrer function for php > > to handle this string an convert it into an php array structure. > > The server can provide each data type in either ascii format or in a binary > representation. In general the binary representation is something that's > easier and more efficient to process by machine. I'm not sure what the > array representation looks like though. > > I don't know whether the PHP driver uses binary representations for > anything. If it does it would make things like integers (imperceptibly) > faster and possibly slightly more reliable. In the case of arrays it would > maybe make it easier to code and maybe significantly more efficient. > > It's possible it's already using binary mode for some data types and just > isn't for arrays. But I suspect it isn't. Thanks for your great explanation, but in PHP you always get "strings" from the PostgreSQL module. I guess even the integers are strings, but i am not sure. kind regards, janning