Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
b1065f8f
Commit
b1065f8f
authored
Mar 23, 2001
by
Philip Warner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix checking of file operations in demo ('files') output format.
parent
a0624736
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
src/bin/pg_dump/pg_backup_files.c
src/bin/pg_dump/pg_backup_files.c
+19
-8
No files found.
src/bin/pg_dump/pg_backup_files.c
View file @
b1065f8f
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.
8 2001/03/22 04:00:13 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.
9 2001/03/23 01:27:12 pjw
Exp $
*
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
*
...
@@ -158,7 +158,9 @@ InitArchiveFmt_Files(ArchiveHandle *AH)
...
@@ -158,7 +158,9 @@ InitArchiveFmt_Files(ArchiveHandle *AH)
ReadHead
(
AH
);
ReadHead
(
AH
);
ReadToc
(
AH
);
ReadToc
(
AH
);
fclose
(
AH
->
FH
);
/* Nothing else in the file... */
/* Nothing else in the file... */
if
(
fclose
(
AH
->
FH
)
!=
0
)
die_horribly
(
AH
,
"%s: Could not close TOC file (fclose failed).
\n
"
,
progname
);
}
}
}
}
...
@@ -268,7 +270,9 @@ _EndData(ArchiveHandle *AH, TocEntry *te)
...
@@ -268,7 +270,9 @@ _EndData(ArchiveHandle *AH, TocEntry *te)
lclTocEntry
*
tctx
=
(
lclTocEntry
*
)
te
->
formatData
;
lclTocEntry
*
tctx
=
(
lclTocEntry
*
)
te
->
formatData
;
/* Close the file */
/* Close the file */
GZCLOSE
(
tctx
->
FH
);
if
(
GZCLOSE
(
tctx
->
FH
)
!=
0
)
die_horribly
(
AH
,
"%s: could not close data file
\n
"
,
progname
);
tctx
->
FH
=
NULL
;
tctx
->
FH
=
NULL
;
}
}
...
@@ -299,7 +303,9 @@ _PrintFileData(ArchiveHandle *AH, char *filename, RestoreOptions *ropt)
...
@@ -299,7 +303,9 @@ _PrintFileData(ArchiveHandle *AH, char *filename, RestoreOptions *ropt)
ahwrite
(
buf
,
1
,
cnt
,
AH
);
ahwrite
(
buf
,
1
,
cnt
,
AH
);
}
}
GZCLOSE
(
AH
->
FH
);
if
(
GZCLOSE
(
AH
->
FH
)
!=
0
)
die_horribly
(
AH
,
"%s: could not close data file after reading
\n
"
,
progname
);
}
}
...
@@ -374,7 +380,8 @@ _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt)
...
@@ -374,7 +380,8 @@ _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt)
_getBlobTocEntry
(
AH
,
&
oid
,
fname
);
_getBlobTocEntry
(
AH
,
&
oid
,
fname
);
}
}
fclose
(
ctx
->
blobToc
);
if
(
fclose
(
ctx
->
blobToc
)
!=
0
)
die_horribly
(
AH
,
"%s: could not close BLOB TOC file
\n
"
,
progname
);
EndRestoreBlobs
(
AH
);
EndRestoreBlobs
(
AH
);
}
}
...
@@ -437,7 +444,8 @@ _CloseArchive(ArchiveHandle *AH)
...
@@ -437,7 +444,8 @@ _CloseArchive(ArchiveHandle *AH)
{
{
WriteHead
(
AH
);
WriteHead
(
AH
);
WriteToc
(
AH
);
WriteToc
(
AH
);
fclose
(
AH
->
FH
);
if
(
fclose
(
AH
->
FH
)
!=
0
)
die_horribly
(
AH
,
"%s: could not close TOC file
\n
"
,
progname
);
WriteDataChunks
(
AH
);
WriteDataChunks
(
AH
);
}
}
...
@@ -524,7 +532,8 @@ _EndBlob(ArchiveHandle *AH, TocEntry *te, int oid)
...
@@ -524,7 +532,8 @@ _EndBlob(ArchiveHandle *AH, TocEntry *te, int oid)
{
{
lclTocEntry
*
tctx
=
(
lclTocEntry
*
)
te
->
formatData
;
lclTocEntry
*
tctx
=
(
lclTocEntry
*
)
te
->
formatData
;
GZCLOSE
(
tctx
->
FH
);
if
(
GZCLOSE
(
tctx
->
FH
)
!=
0
)
die_horribly
(
AH
,
"%s: could not close BLOB file
\n
"
,
progname
);
}
}
/*
/*
...
@@ -541,6 +550,8 @@ _EndBlobs(ArchiveHandle *AH, TocEntry *te)
...
@@ -541,6 +550,8 @@ _EndBlobs(ArchiveHandle *AH, TocEntry *te)
/* Write out a fake zero OID to mark end-of-blobs. */
/* Write out a fake zero OID to mark end-of-blobs. */
/* WriteInt(AH, 0); */
/* WriteInt(AH, 0); */
fclose
(
ctx
->
blobToc
);
if
(
fclose
(
ctx
->
blobToc
)
!=
0
)
die_horribly
(
AH
,
"%s: could not close BLOB TOC file
\n
"
,
progname
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment