tpc-h tpc-ds 数据生成--postgresql

1.修改makefile

#makefile.suite 的更改参数如下

CC = gcc

# Current values for DATABASE are: INFORMIX, DB2, TDAT (Teradata)

# SQLSERVER, SYBASE, ORACLE, VECTORWISE

# Current values for MACHINE are: ATT, DOS, HP, IBM, ICL, MVS,

# SGI, SUN, U2200, VMS, LINUX, WIN32

# Current values for WORKLOAD are: TPCH

DATABASE = POSTGRESQL #程序给定参数没有postgresql ,修改tpcd.h 添加POSTGRESQL脚本

MACHINE = LINUX

WORKLOAD = TPCH

 

2、修改源文件:

//修改tpcd.h

#ifdef POSTGRESQL

#define GEN_QUERY_PLAN "EXPLAIN"

#define START_TRAN "BEGIN TRANSACTION"

#define END_TRAN "COMMIT;"

#define SET_OUTPUT ""

#define SET_ROWCOUNT "LIMIT %d\n"

#define SET_DBASE ""

#endif /* VECTORWISE */

 

3、修改最后一个分隔符(dbgen/print.c):

//#ifdef EOL_HANDLING

if (sep)

//#endif /* EOL_HANDLING */

fprintf(target, "%c", SEPARATOR);

return(0);

 

 

删除最后一个分隔符:

 

:%s/.\{1\}$//

你可能感兴趣的:(tpc-h tpc-ds 数据生成--postgresql)