File tree 1 file changed +7
-10
lines changed
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -640,7 +640,6 @@ pg_import_system_collations(PG_FUNCTION_ARGS)
640
640
int naliases ,
641
641
maxaliases ,
642
642
i ;
643
- int pclose_rc ;
644
643
645
644
/* expansible array of aliases */
646
645
maxaliases = 100 ;
@@ -747,15 +746,13 @@ pg_import_system_collations(PG_FUNCTION_ARGS)
747
746
}
748
747
}
749
748
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 );
759
756
760
757
/*
761
758
* Before processing the aliases, sort them by locale name. The point
You can’t perform that action at this time.
0 commit comments