Обсуждение: Re: 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 |/
On Thu, Jul 13, 2000 at 12:17:28AM +1000, Philip Warner wrote: > 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. > > 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: i suspect you might find a library of either tar or cpio read functions as part of the FreeBSD sysinstall utility. -- [ Jim Mercer jim@reptiles.org +1 416 410-5633 ] [ Reptilian Research -- Longer Life through Colder Blood ] [ Don't be fooled by cheap Finnish imitations; BSD is the One True Code. ]
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: I don't know the details of the API, but the NetBSD pax code handles tar formats (and others) nicely and on a cursory glance seems to have what you need. Of course, the license is acceptable. If you want the source, let me know. Cheers, Brook