diff --git a/.travis.yml b/.travis.yml index 734a9b5..07c7e7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ env: - PGVERSION=11 - PGVERSION=12 - PGVERSION=13 + - PGVERSION=14 before_install: - git clone -b v0.7.13 --depth 1 https://github.com/citusdata/tools.git diff --git a/Makefile b/Makefile index a329d79..0b69b8b 100644 --- a/Makefile +++ b/Makefile @@ -46,8 +46,8 @@ ifndef MAJORVERSION MAJORVERSION := $(basename $(VERSION)) endif -ifeq (,$(findstring $(MAJORVERSION), 9.3 9.4 9.5 9.6 10 11 12 13)) - $(error PostgreSQL 9.3 to 13 is required to compile this extension) +ifeq (,$(findstring $(MAJORVERSION), 9.3 9.4 9.5 9.6 10 11 12 13 14)) + $(error PostgreSQL 9.3 to 14 is required to compile this extension) endif cstore.pb-c.c: cstore.proto diff --git a/cstore_fdw.c b/cstore_fdw.c index 7bfac28..5ee7681 100644 --- a/cstore_fdw.c +++ b/cstore_fdw.c @@ -717,7 +717,13 @@ CopyOutCStoreTable(CopyStmt* copyStatement, const char* queryString) static void CStoreProcessAlterTableCommand(AlterTableStmt *alterStatement) { + + #if PG_VERSION_NUM >= 140000 + ObjectType objectType = alterStatement->objtype; + #else ObjectType objectType = alterStatement->relkind; + #endif + RangeVar *relationRangeVar = alterStatement->relation; Oid relationId = InvalidOid; List *commandList = alterStatement->cmds;