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

Commitaf3abca

Browse files
committed
Allow initdb to complete on systems without "locale" command
This partially reverts2fe3bdb, whichadded an error check on the "locale -a" execution. This is removedagain, adding a comment explaining why. We already had code thatshows a warning if no system locales could be found, which should besufficient for feedback to the user.Discussion:https://www.postgresql.org/message-id/flat/b2b491d1-3b36-15b9-6910-5b5540b27f5c%40enterprisedb.com
1 parent3b30454 commitaf3abca

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

‎src/backend/commands/collationcmds.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,6 @@ pg_import_system_collations(PG_FUNCTION_ARGS)
640640
intnaliases,
641641
maxaliases,
642642
i;
643-
intpclose_rc;
644643

645644
/* expansible array of aliases */
646645
maxaliases=100;
@@ -747,15 +746,13 @@ pg_import_system_collations(PG_FUNCTION_ARGS)
747746
}
748747
}
749748

750-
pclose_rc=ClosePipeStream(locale_a_handle);
751-
if (pclose_rc!=0)
752-
{
753-
ereport(ERROR,
754-
(errcode_for_file_access(),
755-
errmsg("could not execute command \"%s\": %s",
756-
"locale -a",
757-
wait_result_to_str(pclose_rc))));
758-
}
749+
/*
750+
* We don't check the return value of this, because we want to support
751+
* the case where there "locale" command does not exist. (This is
752+
* unusual but can happen on minimalized Linux distributions, for
753+
* example.) We will warn below if no locales could be found.
754+
*/
755+
ClosePipeStream(locale_a_handle);
759756

760757
/*
761758
* Before processing the aliases, sort them by locale name. The point

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp