Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 809C82E0054 for ; Thu, 1 May 2008 14:38:41 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 93907-03 for ; Thu, 1 May 2008 14:38:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by developer.postgresql.org (Postfix) with ESMTP id CBF4D2E002D for ; Thu, 1 May 2008 14:38:36 -0300 (ADT) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id E5F42104EEF; Thu, 1 May 2008 13:38:35 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Thu, 01 May 2008 13:38:36 -0400 X-Sasl-enc: MXdnFAazwKeegVTKuKhnmx1aYBIspB8wwEyYu0hoMf5Q 1209663514 Received: from [10.128.0.117] (unknown [218.30.180.194]) by mail.messagingengine.com (Postfix) with ESMTPSA id E575A1969B; Thu, 1 May 2008 13:38:32 -0400 (EDT) Message-ID: <4819FFFA.40601@fastmail.net> Date: Fri, 02 May 2008 01:38:02 +0800 From: Darren Reed Reply-To: darrenr@fastmail.net User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Alvaro Herrera CC: =?ISO-8859-1?Q?Devrim_G=DCND=DCZ?= , pgsql-admin@postgresql.org, Tom Lane Subject: Re: Some additions to pg_filedump... References: <1208778681.11353.1248996817@webmail.messagingengine.com> <1208809188.18775.86.camel@localhost.localdomain> <1208944558.8724.1249416347@webmail.messagingengine.com> <20080423132049.GF4768@alvh.no-ip.org> In-Reply-To: <20080423132049.GF4768@alvh.no-ip.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200805/15 X-Sequence-Number: 29099 Alvaro Herrera wrote: > Darren Reed wrote: > > >> I saw this, but when I went in search of activity, there was nothing. >> >> Look in: >> http://sources.redhat.com/ml/rhdb/ >> http://sources.redhat.com/ml/rhdb-announce/ >> http://sources.redhat.com/ml/rhdb-cvs/ >> >> All of the archives for 2008 are empty... >> >> It looks like "PostgreSQL - Red Hat Edition Project" is a defunct >> project. >> > > Perhaps it would be apropos for RedHat to donate pg_filedump under BSD > license so we could include it in contrib? It's not like they're > getting much benefit of it being under GPL. > Whether or not that was a hint, I sat down and wrote a program from scratch to try and dump out only the data files. I suppose this might be a version 1.0. http://coombs.anu.edu.au/~avalon/pg_dumpdata.tgz Alas, there is a catch... I couldn't work out the binary format for all of the data types - as an exercise I tried to reverse engineer their behaviour from examining what got stored and for most of the simple types, I think I've got it right. I couldn't fathom "time"; the geometric ones I couldn't easily find examples of how to insert data - I am assuming the web documentation is self explanatory to those who use it; "double" wasn't a straight fit of "double' from unix (huh?) and "bit" wants a length to work which was against what I was trying to achieve. It might be interesting to write something that tries to deconstruct the index files, but to me there's no value in that - the value is in the data. Cheers, Darren