PostgreSQL的 initdb 源代码分析之八

时间:2023-03-09 19:09:32
PostgreSQL的 initdb 源代码分析之八

继续分析

由于 我并未进行特殊的参数设置,所以 (strlen(default_text_search_config) == 0) 成立。

故 调用   default_text_search_config = find_matching_ts_config(lc_ctype)

最后输出:The default text search configuration will be set to "english".

    if (strlen(default_text_search_config) == )
{
default_text_search_config = find_matching_ts_config(lc_ctype);
if (default_text_search_config == NULL)
{
printf(_("%s: could not find suitable text search configuration for locale %s\n"),
progname, lc_ctype);
default_text_search_config = "simple";
}
}
else
{
const char *checkmatch = find_matching_ts_config(lc_ctype); if (checkmatch == NULL)
{
printf(_("%s: warning: suitable text search configuration for locale %s is unknown\n"),
progname, lc_ctype);
}
else if (strcmp(checkmatch, default_text_search_config) != )
{
printf(_("%s: warning: specified text search configuration \"%s\" might not match locale %s\n")          ,progname, default_text_search_config, lc_ctype);
}
} printf(_("The default text search configuration will be set to \"%s\".\n"),
default_text_search_config); printf("\n");

接下来:

这就是说,为了预备创建文件时,设置好预先制定的mask:

这里是:

S_IRWXG: 组成员可以读写执行。

S_RIWXO:   其他用户可以读写执行。

umask(S_IRWXG | S_IRWXO);