Re: Recovering data via raw table and field separators

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: John Wells <jb(at)sourceillustrated(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Recovering data via raw table and field separators
Date: 2007-12-04 18:38:16
Message-ID: 20071204183816.GH4727@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John Wells wrote:
> On 12/4/07, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > There are no field separators. Perhaps you could extract some useful
> > info with pg_filedump, which you can grab at
> > http://sources.redhat.com/rhdb
>
> So is it simply field width? Can one count the number of bytes based
> on native datatype length and determine field start/end?

Yes. For variable length types, there is a 4-byte length word at the
start of the field (unless you are using 8.3 which introduces more
compact representations in some cases).

--
Alvaro Herrera http://www.flickr.com/photos/alvherre/
"If it wasn't for my companion, I believe I'd be having
the time of my life" (John Dunbar)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-12-04 18:58:54 Re: Recovering data via raw table and field separators
Previous Message Greg Smith 2007-12-04 18:38:00 Re: WAL shipping question