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 451ED52A2F for ; Tue, 16 Aug 2005 17:08:12 -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 84851-09 for ; Tue, 16 Aug 2005 20:08:10 +0000 (GMT) Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by svr1.postgresql.org (Postfix) with ESMTP id 8512C52A7E for ; Tue, 16 Aug 2005 17:08:09 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1E57j8-0007pn-00; Tue, 16 Aug 2005 16:08:02 -0400 To: Janning Vygen Cc: pgsql-php@postgresql.org, Greg Stark Subject: Re: How to parse data type array columns? References: <200508161004.07400.vygen@gmx.de> <871x4tx6rv.fsf@stark.xeocode.com> <200508162025.17280.vygen@gmx.de> In-Reply-To: <200508162025.17280.vygen@gmx.de> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 16 Aug 2005 16:08:01 -0400 Message-ID: <873bp9ve5a.fsf@stark.xeocode.com> Lines: 22 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 required=5 tests=[AWL=0.003] X-Spam-Level: X-Archive-Number: 200508/7 X-Sequence-Number: 3219 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. -- greg