diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-29 01:38:56 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-29 01:38:56 +0000 |
commit | 49bf04ba8cd3390dd4abbc7e10242f60f67c1f93 (patch) | |
tree | 1fc3a92aa69e918669dba5ff4d0732bc2d2477a0 /src/bin/pg_dump/pg_backup_files.c | |
parent | dc20063e43d6bbc97381c03b7651c5bbafea7f35 (diff) | |
download | postgresql-49bf04ba8cd3390dd4abbc7e10242f60f67c1f93.tar.gz postgresql-49bf04ba8cd3390dd4abbc7e10242f60f67c1f93.zip |
Fix some more not-schema-aware queries in pg_dump. Also fix some places
that would do the wrong thing with BLOB OIDs exceeding 2G.
Diffstat (limited to 'src/bin/pg_dump/pg_backup_files.c')
-rw-r--r-- | src/bin/pg_dump/pg_backup_files.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/pg_dump/pg_backup_files.c b/src/bin/pg_dump/pg_backup_files.c index 33e49b2d380..4c538f02a2c 100644 --- a/src/bin/pg_dump/pg_backup_files.c +++ b/src/bin/pg_dump/pg_backup_files.c @@ -20,7 +20,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.15 2002/04/24 02:21:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.16 2002/05/29 01:38:56 tgl Exp $ * * Modifications - 28-Jun-2000 - pjw@rhyme.com.au * @@ -76,7 +76,7 @@ typedef struct static char *modulename = gettext_noop("file archiver"); static void _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt); -static void _getBlobTocEntry(ArchiveHandle *AH, int *oid, char *fname); +static void _getBlobTocEntry(ArchiveHandle *AH, Oid *oid, char *fname); /* * Initializer @@ -328,7 +328,7 @@ _PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt) } static void -_getBlobTocEntry(ArchiveHandle *AH, int *oid, char fname[K_STD_BUF_SIZE]) +_getBlobTocEntry(ArchiveHandle *AH, Oid *oid, char fname[K_STD_BUF_SIZE]) { lclContext *ctx = (lclContext *) AH->formatData; char blobTe[K_STD_BUF_SIZE]; @@ -337,7 +337,7 @@ _getBlobTocEntry(ArchiveHandle *AH, int *oid, char fname[K_STD_BUF_SIZE]) if (fgets(&blobTe[0], K_STD_BUF_SIZE - 1, ctx->blobToc) != NULL) { - *oid = atoi(blobTe); + *oid = atooid(blobTe); fpos = strcspn(blobTe, " "); @@ -360,7 +360,7 @@ _getBlobTocEntry(ArchiveHandle *AH, int *oid, char fname[K_STD_BUF_SIZE]) static void _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt) { - int oid; + Oid oid; lclContext *ctx = (lclContext *) AH->formatData; char fname[K_STD_BUF_SIZE]; @@ -509,9 +509,9 @@ _StartBlob(ArchiveHandle *AH, TocEntry *te, Oid oid) sfx = ""; sprintf(fmode, "wb%d", AH->compression); - sprintf(fname, "blob_%d.dat%s", oid, sfx); + sprintf(fname, "blob_%u.dat%s", oid, sfx); - fprintf(ctx->blobToc, "%d %s\n", oid, fname); + fprintf(ctx->blobToc, "%u %s\n", oid, fname); #ifdef HAVE_LIBZ tctx->FH = gzopen(fname, fmode); |