继续分析

由于 我并未进行特殊的参数设置,所以 (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);

PostgreSQL的 initdb 源代码分析之八的更多相关文章

  1. PostgreSQL的initdb 源代码分析之六

    继续分析 下面的是获取运行此程序的用户名称,主要还是为了防止在linux下用root来运行的情形. effective_user = get_id(); ) username = effective_ ...

  2. PostgreSQL的 initdb 源代码分析之二

    继续分析 下面这一段,当 initdb --version 或者  initdb --help 才有意义. ) { ], || strcmp(argv[], ) { usage(progname); ...

  3. PostgreSQL的 initdb 源代码分析之二十四

    继续分析: make_template0(); 展开: 无需再作解释,就是创建template0数据库 /* * copy template1 to template0 */ static void ...

  4. PostgreSQL的 initdb 源代码分析之十五

    继续分析: if (pwprompt || pwfilename) get_set_pwd(); 由于我启动initdb的时候,没有设置口令相关的选项,故此略过. 接下来: setup_depend( ...

  5. PostgreSQL的 initdb 源代码分析之十三

    继续分析: /* Bootstrap template1 */ bootstrap_template1(); 展开: 我这里读入的文件是:/home/pgsql/project/share/postg ...

  6. PostgreSQL的 initdb 源代码分析之十二

    继续分析 /* Now create all the text config files */ setup_config(); 将其展开: 实质就是,确定各种参数,分别写入 postgresql.co ...

  7. PostgreSQL的 initdb 源代码分析之十一

    继续分析: /* Top level PG_VERSION is checked by bootstrapper, so make it first */ write_version_file(NUL ...

  8. PostgreSQL的 initdb 源代码分析之七

    继续分析:由于我使用initdb的时候,没有指定 locale,所以会使用OS的缺省locale,这里是 en_US.UTF-8 printf(_("The files belonging ...

  9. PostgreSQL的initdb 源代码分析之五

    接前面,继续分析: putenv("TZ=GMT") 设置了时区信息. find_other_exec(argv[0], "postgres", PG_BACK ...

随机推荐

  1. HDU 2444 The Accomodation of Students (偶图判定,匈牙利算法)

    题意: 有一堆的学生关系,要将他们先分成两个组,同组的人都不互不认识,如果不能分2组,输出No.若能,则继续.在两组中挑两个认识的人(每组各1人)到一个双人房.输出需要多少个双人房? 思路: 先判定是 ...

  2. 基于phpExcel写的excel类

    <?php /* * 类的功能 * 传入二位数组导出excel * 传入excel 导出二位数组 * @author mrwu */ require('PHPExcel.php'); requi ...

  3. fmri当前相关软件工具整理

    1.spm; 2.afni; 3.fsl; 4.drtools; 5.prtools; 6.phycaa+; 7.cca-fmri;

  4. 解决Jsoup网页抓取过程中需要cookie的问题

    最近在做城觅网的信息抓取,发现城觅网上海与北京的url是一样的.那怎样才确定信息的来源呢?折腾了半天,才发现城觅网是使用cookie的,如果你把网站的cookie禁用了,就无法在上海与北京之间切换了. ...

  5. 安卓dalvik和art区别

    Dalvik模式像是一台折叠自行车,每次骑之前都要组装后才能上路.而ART模式就是一个已经装好的自行车,直接就能上车走人.所以ART模式在效率上肯定是要好于Dalvik. 通过以上这种表格,我们可以直 ...

  6. Windows Sockets Error Codes

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx Most Windows Sockets ...

  7. JavaScript基础篇最全

    本章内容: 简介 定义 注释 引入文件 变量 运算符 算术运算符 比较运算符 逻辑运算符 数据类型 数字 字符串 布尔类型 数组 Math 语句 条件语句(if.switch) 循环语句(for.fo ...

  8. Codeforces Round #361 (Div. 2) 套题

    A - Mike and Cellphone 问有没有多解,每个点按照给出的序列用向量法跑一遍 #include<cstdio> #include<cstring> #incl ...

  9. Oracle11g导入*.dmp数据文件

    imp命令导入数据:imp username/password@SID file=XXX.dmp fromuser=XXX touser=XXX tables=(XXX,XXX)  [ignore=y ...

  10. int.class与Integer.type的不同

    int.class返回Integer的对象 Integer.type返回int对象