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
6cc6f18d
Commit
6cc6f18d
authored
24 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
open(2) flags saved for re-opening a virtual file should probably not
include O_CREAT.
parent
503c80d2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/storage/file/fd.c
+5
-3
5 additions, 3 deletions
src/backend/storage/file/fd.c
with
5 additions
and
3 deletions
src/backend/storage/file/fd.c
+
5
−
3
View file @
6cc6f18d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.7
4
2001/0
3/22 03:59:45 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.7
5
2001/0
4/03 02:31:52 tgl
Exp $
*
*
* NOTES:
* NOTES:
*
*
...
@@ -112,7 +112,7 @@ typedef struct vfd
...
@@ -112,7 +112,7 @@ typedef struct vfd
long
seekPos
;
/* current logical file position */
long
seekPos
;
/* current logical file position */
char
*
fileName
;
/* name of file, or NULL for unused VFD */
char
*
fileName
;
/* name of file, or NULL for unused VFD */
/* NB: fileName is malloc'd, and must be free'd when closing the VFD */
/* NB: fileName is malloc'd, and must be free'd when closing the VFD */
int
fileFlags
;
/* open(2) flags for opening the file */
int
fileFlags
;
/* open(2) flags for
(re)
opening the file */
int
fileMode
;
/* mode to pass to open(2) */
int
fileMode
;
/* mode to pass to open(2) */
}
Vfd
;
}
Vfd
;
...
@@ -681,8 +681,10 @@ fileNameOpenFile(FileName fileName,
...
@@ -681,8 +681,10 @@ fileNameOpenFile(FileName fileName,
vfdP
->
fileName
=
malloc
(
strlen
(
fileName
)
+
1
);
vfdP
->
fileName
=
malloc
(
strlen
(
fileName
)
+
1
);
strcpy
(
vfdP
->
fileName
,
fileName
);
strcpy
(
vfdP
->
fileName
,
fileName
);
vfdP
->
fileFlags
=
fileFlags
&
~
(
O_TRUNC
|
O_EXCL
);
/* Saved flags are adjusted to be OK for re-opening file */
vfdP
->
fileFlags
=
fileFlags
&
~
(
O_CREAT
|
O_TRUNC
|
O_EXCL
);
vfdP
->
fileMode
=
fileMode
;
vfdP
->
fileMode
=
fileMode
;
vfdP
->
seekPos
=
0
;
vfdP
->
seekPos
=
0
;
/*
/*
...
...
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