RE: [GENERAL] RE: pg_dump & blobs - editable dump? - Mailing list pgsql-hackers

From Philip Warner
Subject RE: [GENERAL] RE: pg_dump & blobs - editable dump?
Date
Msg-id 3.0.5.32.20000713011104.02ef1940@mail.rhyme.com.au
Whole thread Raw
Responses Re: [GENERAL] RE: pg_dump & blobs - editable dump?  (Giles Lean <giles@nemeton.com.au>)
List pgsql-hackers
At 15:25 12/07/00 +0100, Peter Mount wrote:
>No he didn't, just I've been sort of lurking on this subject ;-)
>
>Actually, tar files are simply a small header, followed by the file's
>contents. To add another file, you simply write another header, and contents
>(which is why you can cat two tar files together and get a working file).
>
>http://www.goice.co.jp/member/mo/formats/tar.html has a nice brief
>description of the header.
>

Damn! I knew someone would call my bluff.

As you say, it looks remarkably simple.

A couple of questions:


    136     12 bytes  Modify time (in octal ascii)

    ...do you know the format of the date (seconds since 1970?).


    157    100 bytes  Linkname ('\0' terminated, 99 maxmum length)

    ...what's this? Is it the target for symlinks?


    329      8 bytes  Major device ID (in octal ascii)
    337      8 bytes  Minor device ID (in octal ascii)345    167 bytes
Padding

    ...and what should I set these to?

>As for a C api with a compatible licence, if needs must I'll write one to
>your spec (maidast should be back online in a couple of days, so I'll be
>back in business development wise).

If you're serious about the offer, I'd be happy. But, given how simple the
format is, I can probably tack in into place myself.

There is a minor problem. Currently I compress the output stream as I
receive it from PG, and send it to the archive. I don't know how big it
will be until it is written. The custom output format can handle this, but
in streaming a tar file to tape, I have to know the file size first. This
means writing to /tmp. I supose that's OK, but I've been trying to avoid it.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

pgsql-hackers by date:

Previous
From: Tim Perdue
Date:
Subject: Re: 7.0.2 issues / Geocrawler
Next
From: Philip Warner
Date:
Subject: Re: pg_dump & blobs - editable dump?