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@rhyme.com.au]
Sent: Wednesday, July 12, 2000 3:17 PM
To: Peter Mount; pgsql-hackers@postgresql.org;
pgsql-general@postgresql.org
Cc: Pavel@Janik.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 |/