Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
330b4e42
Commit
330b4e42
authored
22 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Changes of 6-Sep-02 broke pg_restore's ability to recognize tar-format
files. Fix it.
parent
21166170
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bin/pg_dump/pg_backup_archiver.h
+2
-2
2 additions, 2 deletions
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_tar.c
+13
-3
13 additions, 3 deletions
src/bin/pg_dump/pg_backup_tar.c
with
15 additions
and
5 deletions
src/bin/pg_dump/pg_backup_archiver.h
+
2
−
2
View file @
330b4e42
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.
49
200
2/10/25 01:33:17 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.
50
200
3/02/01 19:29:16 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -309,7 +309,7 @@ extern void InitArchiveFmt_Files(ArchiveHandle *AH);
...
@@ -309,7 +309,7 @@ extern void InitArchiveFmt_Files(ArchiveHandle *AH);
extern
void
InitArchiveFmt_Null
(
ArchiveHandle
*
AH
);
extern
void
InitArchiveFmt_Null
(
ArchiveHandle
*
AH
);
extern
void
InitArchiveFmt_Tar
(
ArchiveHandle
*
AH
);
extern
void
InitArchiveFmt_Tar
(
ArchiveHandle
*
AH
);
extern
int
isValidTarHeader
(
char
*
header
);
extern
bool
isValidTarHeader
(
char
*
header
);
extern
OutputContext
SetOutput
(
ArchiveHandle
*
AH
,
char
*
filename
,
int
compression
);
extern
OutputContext
SetOutput
(
ArchiveHandle
*
AH
,
char
*
filename
,
int
compression
);
extern
void
ResetOutput
(
ArchiveHandle
*
AH
,
OutputContext
savedContext
);
extern
void
ResetOutput
(
ArchiveHandle
*
AH
,
OutputContext
savedContext
);
...
...
This diff is collapsed.
Click to expand it.
src/bin/pg_dump/pg_backup_tar.c
+
13
−
3
View file @
330b4e42
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.3
3
2003/0
1/10 23:4
9:
0
6 tgl Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.3
4
2003/0
2/01 19:2
9:
1
6 tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -981,7 +981,7 @@ _tarChecksum(char *header)
...
@@ -981,7 +981,7 @@ _tarChecksum(char *header)
return
sum
+
256
;
/* Assume 8 blanks in checksum field */
return
sum
+
256
;
/* Assume 8 blanks in checksum field */
}
}
int
bool
isValidTarHeader
(
char
*
header
)
isValidTarHeader
(
char
*
header
)
{
{
int
sum
;
int
sum
;
...
@@ -989,7 +989,17 @@ isValidTarHeader(char *header)
...
@@ -989,7 +989,17 @@ isValidTarHeader(char *header)
sscanf
(
&
header
[
148
],
"%8o"
,
&
sum
);
sscanf
(
&
header
[
148
],
"%8o"
,
&
sum
);
return
(
sum
==
chk
&&
strncmp
(
&
header
[
257
],
"ustar "
,
7
)
==
0
);
if
(
sum
!=
chk
)
return
false
;
/* POSIX format */
if
(
strncmp
(
&
header
[
257
],
"ustar00"
,
7
)
==
0
)
return
true
;
/* older format */
if
(
strncmp
(
&
header
[
257
],
"ustar "
,
7
)
==
0
)
return
true
;
return
false
;
}
}
/* Given the member, write the TAR header & copy the file */
/* Given the member, write the TAR header & copy the file */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment