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 DBE2D529A5 for ; Tue, 16 Aug 2005 12:04:30 -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 07938-02 for ; Tue, 16 Aug 2005 15:04:29 +0000 (GMT) Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by svr1.postgresql.org (Postfix) with ESMTP id 435675299E for ; Tue, 16 Aug 2005 12:04:29 -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 1E52zE-00064B-00; Tue, 16 Aug 2005 11:04:20 -0400 To: Janning Vygen Cc: pgsql-php@postgresql.org Subject: Re: How to parse data type array columns? References: <200508161004.07400.vygen@gmx.de> In-Reply-To: <200508161004.07400.vygen@gmx.de> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 16 Aug 2005 11:04:20 -0400 Message-ID: <871x4tx6rv.fsf@stark.xeocode.com> Lines: 21 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/5 X-Sequence-Number: 3217 Janning Vygen writes: > Hi, > > if you use array data type in your database design and query your tables with > PHP you get a string which represents the array. It can look something like > this: > > [1:2]{{"Hallo", "Te\"st},"},{"Hallo", "Test"}} Do you still get that if you use the binary format? I would expect it to be easier to parse the binary format than this format which is really intended for humans and dump files. I think the right place to deal with this is down in the driver where it has all the information about the types and can request the format it wants from the database. -- greg