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
85b2facd
Commit
85b2facd
authored
Oct 24, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write config files as text not binary, per Magnus Hagander.
parent
15db0318
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+5
-2
No files found.
src/bin/initdb/initdb.c
View file @
85b2facd
...
...
@@ -39,7 +39,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.6
4 2004/10/22 22:30:57
tgl Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.6
5 2004/10/24 15:55:29
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -407,6 +407,9 @@ readfile(char *path)
/*
* write an array of lines to a file
*
* This is only used to write text files. Use fopen "w" not PG_BINARY_W
* so that the resulting configuration files are nicely editable on Windows.
*/
static
void
writefile
(
char
*
path
,
char
**
lines
)
...
...
@@ -414,7 +417,7 @@ writefile(char *path, char **lines)
FILE
*
out_file
;
char
**
line
;
if
((
out_file
=
fopen
(
path
,
PG_BINARY_W
))
==
NULL
)
if
((
out_file
=
fopen
(
path
,
"w"
))
==
NULL
)
{
fprintf
(
stderr
,
_
(
"%s: could not open file
\"
%s
\"
for writing: %s
\n
"
),
progname
,
path
,
strerror
(
errno
));
...
...
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