Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit421089d

Browse files
committed
Cleanup for canonicalization fixes, from Tom.
1 parenta1f3209 commit421089d

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.408 2004/07/1121:33:59 momjian Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.409 2004/07/1123:49:45 momjian Exp $
4141
*
4242
* NOTES
4343
*
@@ -372,7 +372,6 @@ PostmasterMain(int argc, char *argv[])
372372
InitializeGUCOptions();
373373

374374
userPGDATA=getenv("PGDATA");/* default value */
375-
canonicalize_path(userPGDATA);
376375

377376
opterr=1;
378377

@@ -526,6 +525,12 @@ PostmasterMain(int argc, char *argv[])
526525
ExitPostmaster(1);
527526
}
528527

528+
if (userPGDATA)
529+
{
530+
userPGDATA=strdup(userPGDATA);
531+
canonicalize_path(userPGDATA);
532+
}
533+
529534
if (onlyConfigSpecified(userPGDATA))
530535
{
531536
/*

‎src/backend/utils/init/miscinit.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.127 2004/06/18 06:13:54 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.128 2004/07/11 23:49:48 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -207,10 +207,6 @@ SetDataDir(const char *dir)
207207
errmsg("out of memory")));
208208
}
209209

210-
/*
211-
* Strip any trailing slash. Not strictly necessary, but avoids
212-
* generating funny-looking paths to individual files.
213-
*/
214210
canonicalize_path(new);
215211

216212
if (DataDir)

‎src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.216 2004/07/1121:48:25 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.217 2004/07/1123:49:51 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -5441,7 +5441,7 @@ assign_canonical_path(const char *newval, bool doit, GucSource source)
54415441
if (doit)
54425442
{
54435443
/* We have to create a new pointer to force the change */
5444-
char*canon_val=guc_strdup(FATAL,newval);
5444+
char*canon_val=guc_strdup(ERROR,newval);
54455445
canonicalize_path(canon_val);
54465446
returncanon_val;
54475447
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp