继续分析:

    setup_dictionary();

展开:

其中:

cmd 是:"/home/pgsql/project/bin/postgres" --single -F -O -c search_path=pg_catalog -c exit_on_error=true -j template1 >/dev/null

dictionary_file 是:/home/pgsql/project/share/snowball_create.sql

/*
* load extra dictionaries (Snowball stemmers)
*/
static void
setup_dictionary(void)
{
PG_CMD_DECL;
char **line;
char **conv_lines; fputs(_("creating dictionaries ... "), stdout);
fflush(stdout); /*
* We use -j here to avoid backslashing stuff
*/
snprintf(cmd, sizeof(cmd),
"\"%s\" %s -j template1 >%s",
backend_exec, backend_options,
DEVNULL); PG_CMD_OPEN; conv_lines = readfile(dictionary_file);
for (line = conv_lines; *line != NULL; line++)
{
PG_CMD_PUTS(*line);
free(*line);
} free(conv_lines); PG_CMD_CLOSE; check_ok();
}

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

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

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

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

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

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

    继续分析: setup_conversion(); 展开: 其实质是: 运行命令:"/home/pgsql/project/bin/postgres" --single -F -O ...

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

    继续分析 setup_description(); 展开后: 就是要把 share/postgres.description 文件的内容读入到 pg_description 和 pg_shdescri ...

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

    继续分析: /* * Make the per-database PG_VERSION for template1 only after init'ing it */ write_version_fi ...

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

    继续分析, 如下这段,因为条件不成立,被跳过: /* Create transaction log symlink, if required */ ) { fprintf(stderr,"I ...

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

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

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

    继续分析: make_postgres(); 展开: 目的是创建postgres数据库. cmd是:/home/pgsql/project/bin/postgres" --single -F ...

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

    继续分析 load_plpgsql(); 展开: 就是让postgres 执行 create extension plpgsql cmd是: "/home/pgsql/project/bin ...

随机推荐

  1. Android-取消GridView/ListView item被点击时的效果

    方法一,在控件被初始化的时候设置 gridView.setSelector(new ColorDrawable(Color.TRANSPARENT)); listView.setSelector(ne ...

  2. OracleHelper(for produce)

    OracleHelper中,有一个用存储过程实现的Insert方法. 然后我把执行存储过程的方法 封装成了可以执行任何存储过程,参数是 存储过程名称 以及存错过程中的传入.传出参数 using Ora ...

  3. Win10遇上Kindle就蓝屏

    在使用 Kindle 连接 Win10 时会出现蓝屏现象,现在,微软承认 Windows 10 插入 Kindle 导致蓝屏问题,并表示目前正着手制作补丁.微软表示:“我们承认确实存在当Kindle ...

  4. IOS 弹出式 POPMenuView

    //MenuView.h   // //  MenuView.h //  RockPopMenu // //  Created by zhuang chaoxiao on 14-6-26. //  C ...

  5. Webdriver API (三)- actions

    Actions类主要定义了一些模拟用户的鼠标mouse,键盘keyboard操作.对于这些操作,使用perform()方法进行执行. actions类可以完成单一的操作,也可以完成几个操作的组合. 有 ...

  6. 《Python核心编程》 第八章 条件和循环

    8–1.条件语句. 请看下边的代码 # statement A if x > 0: # statement B pass elif x < 0: # statement C pass el ...

  7. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_label(self, locator)

    def get_selected_list_label(self, locator): """Returns the visible label of the selec ...

  8. MFC字体与文本输出

    字体 成员函数 1.CFont( ); 构造一个CFont对象.此对象在使用之前应该先使用CreateFont.CreateFontIndirect.CreatePointFont或CreatePoi ...

  9. document.getElementsByClassName方法的重写(OVERRIDE)

    众所周知,对于IE8以下的浏览器(IE8居然是WIN7预装的)没有document.getElementsByClassName,网上也有很多重写的方法,以下是本人在项目中所使用的方法 documen ...

  10. 机器学习真的可以起作用吗?(2)(以二维PLA算法为例)

    一个问题:大多数情况下,M(hypothesis set的大小)是无穷大的,例如PLA算法.那么是不是我们的原则1就不能使用了? 我们试着做一些努力: Step1:寻找hypothesis set的e ...