diff --git a/Makefile b/Makefile index 02daf62..456a028 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,14 @@ PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) +ifndef MAJORVERSION + MAJORVERSION := $(basename $(VERSION)) +endif + +ifeq (,$(findstring $(MAJORVERSION), 9.3 9.4)) + $(error PostgreSQL 9.3 or 9.4 is required to compile this extension) +endif + cstore.pb-c.c: cstore.proto protoc-c --c_out=. cstore.proto diff --git a/README.md b/README.md index 4a074b1..3219eb4 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,9 @@ installation's bin/ directory path. For example: PATH=/usr/local/pgsql/bin/:$PATH make sudo PATH=/usr/local/pgsql/bin/:$PATH make install +**Note.** cstore_fdw requires PostgreSQL 9.3 or 9.4. It doesn't support earlier +versions of PostgreSQL. + Usage -----