RE: RE: [HACKERS] pg_dump & blobs - editable dump?

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Philip Warner'" <pjw(at)rhyme(dot)com(dot)au>, Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>, pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Cc: Pavel(at)Janik(dot)cz
Subject: RE: RE: [HACKERS] pg_dump & blobs - editable dump?
Date: 2000-07-12 14:25:24
Message-ID: 1B3D5E532D18D311861A00600865478CF1B07C@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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.

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).

Peter

--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council

-----Original Message-----
From: Philip Warner [mailto:pjw(at)rhyme(dot)com(dot)au]
Sent: Wednesday, July 12, 2000 3:17 PM
To: Peter Mount; pgsql-hackers(at)postgresql(dot)org;
pgsql-general(at)postgresql(dot)org
Cc: Pavel(at)Janik(dot)cz
Subject: Re: [GENERAL] RE: [HACKERS] pg_dump & blobs - editable dump?

At 14:58 12/07/00 +0100, Peter Mount wrote:
>Why not have it using something like tar, and the first file being stored
in
>ascii?
>
>That way, you could extract easily the human readable SQL but still pipe
the
>blobs to stdout.

Has Tom Lane paid you to send this message? :-}

If anyone can send me a nice interface for reading and writing a tar file
from C, I'll do it. I just don't have the inclination to learn about tar
internals at the moment. By 'nice' I mean that I would like:

- to be able to create the archive and write files sequentially using
something similar to fopen/fwrite/fclose.

- open an archive and examine and read files sequentially using a similar
interface to opendir/readdir/fopen/fread/fclose.

- Ideally open a specified file in the archive by name, but if not
possible, then it should be easy using the 'opedir' function above.

This would be a very useful library, I am sure. It also needs to be
licensable under BSD to go into the PG distribution.

----------------------------------------------------------------
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 |/

Browse pgsql-general by date

  From Date Subject
Next Message Peter Mount 2000-07-12 14:32:10 RE: [HACKERS] pg_dump & blobs - editable dump?
Previous Message Jim Mercer 2000-07-12 14:24:46 Re: RE: [HACKERS] pg_dump & blobs - editable dump?

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-07-12 14:29:53 AW: AW: update on TOAST status'
Previous Message Jim Mercer 2000-07-12 14:24:46 Re: RE: [HACKERS] pg_dump & blobs - editable dump?