PostgreSQL的 initdb 源代码分析之十九
继续分析:
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 源代码分析之十九的更多相关文章
- PostgreSQL的 initdb 源代码分析之十五
继续分析: if (pwprompt || pwfilename) get_set_pwd(); 由于我启动initdb的时候,没有设置口令相关的选项,故此略过. 接下来: setup_depend( ...
- PostgreSQL的 initdb 源代码分析之十二
继续分析 /* Now create all the text config files */ setup_config(); 将其展开: 实质就是,确定各种参数,分别写入 postgresql.co ...
- PostgreSQL的 initdb 源代码分析之十八
继续分析: setup_conversion(); 展开: 其实质是: 运行命令:"/home/pgsql/project/bin/postgres" --single -F -O ...
- PostgreSQL的 initdb 源代码分析之十六
继续分析 setup_description(); 展开后: 就是要把 share/postgres.description 文件的内容读入到 pg_description 和 pg_shdescri ...
- PostgreSQL的 initdb 源代码分析之十四
继续分析: /* * Make the per-database PG_VERSION for template1 only after init'ing it */ write_version_fi ...
- PostgreSQL的 initdb 源代码分析之十
继续分析, 如下这段,因为条件不成立,被跳过: /* Create transaction log symlink, if required */ ) { fprintf(stderr,"I ...
- PostgreSQL的 initdb 源代码分析之二十四
继续分析: make_template0(); 展开: 无需再作解释,就是创建template0数据库 /* * copy template1 to template0 */ static void ...
- PostgreSQL的 initdb 源代码分析之二十五
继续分析: make_postgres(); 展开: 目的是创建postgres数据库. cmd是:/home/pgsql/project/bin/postgres" --single -F ...
- PostgreSQL的 initdb 源代码分析之二十二
继续分析 load_plpgsql(); 展开: 就是让postgres 执行 create extension plpgsql cmd是: "/home/pgsql/project/bin ...
随机推荐
- datatables使用总结篇
<!doctype html> <html> <head> <meta charset="gbk"/> <meta name= ...
- Azure SQL 数据库:服务级别与性能问答
ShawnBice 2014 年 5 月 5 日上午 10:00 几天前,我发表了一篇文章,并就 4 月 24 日发布的适用于Windows Azure SQL 数据库的新服务级别提供了一些预料 ...
- UVa 11729 Commando War 突击战
你有 n 个部下,每个部下需要完成一个任务.第 i 个部下需要你花 Bi 分钟交待任务,然后他会立刻独立地.无间断地执行 Ji 分钟后完成任务.你需要选择交待任务的顺序,使得所有任务尽早执行完毕(即最 ...
- 【DFS深搜初步】HDOJ-2952 Counting Sheep、NYOJ-27 水池数目
[题目链接:HDOJ-2952] Counting Sheep Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 ...
- Delphi 编译错误信息表
; not allowed before ELSE ElSE前不允许有“;” <clause> clause not allowed in OLE automation section 在 ...
- mysql使用经验总结
在工作中难免会遇到一些这个问题那个问题,当然在mysql中也不例外.今天就让我们来学学mysql中一些比较常用的东西 . 1.有时我们想去查某张表中的字段,但是表中的数据多,字段也很多,如果用sel ...
- codeforces 680E Bear and Square Grid 巧妙暴力
这个题是个想法题 先预处理连通块,然后需要用到一种巧妙暴力,即0变1,1变0,一列列添加删除 复杂度O(n^3) #include <cstdio> #include <iostre ...
- BLOCK 死循环
__weak typeof(self) weakSelf = self; myObj.myBlock = ^{ __strong typeof(self) strongSelf = weak ...
- (转载) VS编译duilib项目时候的错误解决方法整理
原文地址:http://blog.csdn.net/x356982611/article/details/30217473 @1:找不到Riched20.lib 用everything等软件搜索下磁盘 ...
- [原创]从Confluence获取html table并将其序列化为C#类文件的工具
公司项目的游戏数据模型文档写在Confluence上,由于在项目初期模型变动比较频繁,手工去将文档中最新的模型结构同步到代码中比较费时费力,而且还很容易出错,于是写了一个小工具来自动化这个同步更新模型 ...