摘要:
看代码:/* * mdopen() -- Open the specified relation. * * Note we only open the first segment, when there are multiple segments. * * If first segment is not present, either ereport or return NULL according * to "behavior". We treat EXTENSION_CREATE the same as EXTENSION_FAIL; * EXTENSION_CREAT 阅读全文
摘要:
在网上学到的,备忘:[root@lex tst]# cat gao3.c#include <stdio.h>#include <string.h>char * function1 (char *p){ printf("In function1 %s\n",p); return p;}char * function2 (char *p){ printf("In function2 %s\n",p); return p;}char * function3 (char *p){ printf("In function3 %s\ 阅读全文
摘要:
再回过头来看/* * open a file in an arbitrary directory * * NB: if the passed pathname is relative (which it usually is), * it will be interpreted relative to the process' working directory * (which should always be $PGDATA when this code is running). */FilePathNameOpenFile(FileName fileName, int fileF 阅读全文
摘要:
看PostgreSQL中的代码:/* Debugging.... */#ifdef FDDEBUG#define DO_DB(A) A#else#define DO_DB(A) /* A */#endif此后,在为定义 FDDEBUG的情况下,如果执行 DO_DB(function1());就相当于 /*function1();*/,也就是什么都不执行而且,如果对PostgreSQL进行查找,发现 没有定义 FDDEBUG 的地方,估计哪个开发者自己手工加入的吧:[root@lex ttt]# find ./ | xargs grep "FDDEBUG"Bina... 阅读全文