more Makefile cleanup

merge-cstore-pykello
Jeff Davis 2020-09-16 11:06:40 -07:00
parent ec8afe0a5d
commit 4dfec401ce
2 changed files with 16 additions and 8 deletions

View File

@ -15,6 +15,7 @@ endif
MVER = $(firstword $(VER_WORDS))
# version >= 12?
ifeq ($(lastword $(sort 12 $(MVER))),$(MVER))
USE_TABLEAM = yes
USE_FDW = yes
@ -74,10 +75,7 @@ PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
installcheck: remove_cstore_files
remove_cstore_files:
rm -f data/*.cstore data/*.cstore.footer
installcheck:
reindent:
citus_indent .

16
mod.c
View File

@ -16,28 +16,38 @@
#include "fmgr.h"
#include "mod.h"
#if PG_VERSION_NUM >= 120000
#ifdef USE_TABLEAM
#include "cstore_tableam.h"
#endif
#ifdef USE_FDW
#include "cstore_fdw.h"
#endif
PG_MODULE_MAGIC;
void
_PG_init(void)
{
#if PG_VERSION_NUM >= 120000
#ifdef USE_TABLEAM
cstore_tableam_init();
#endif
#ifdef USE_FDW
cstore_fdw_init();
#endif
}
void
_PG_fini(void)
{
#if PG_VERSION_NUM >= 120000
#if USE_TABLEAM
cstore_tableam_finish();
#endif
#ifdef USE_FDW
cstore_fdw_finish();
#endif
}