From ccbaf785cf9272ba0f73937b99ba3be8976a4844 Mon Sep 17 00:00:00 2001 From: Raul Marin Date: Tue, 22 Oct 2019 15:49:31 +0200 Subject: [PATCH] Updates --- .travis.yml | 2 +- Makefile | 4 ++-- README.md | 2 +- expected/test_setup.out | 4 +--- sql/test_setup.sql | 4 +--- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58847e0..56bbbf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ script: - sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests postgresql-$POSTGRESQL_VERSION postgresql-client-$POSTGRESQL_VERSION postgresql-server-dev-$POSTGRESQL_VERSION postgresql-common - if [[ $POSTGRESQL_VERSION == '9.6' ]]; then sudo apt-get install -y postgresql-contrib-9.6; fi; - sudo apt-get install -y --allow-unauthenticated postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION-scripts postgis - # For pre12, install plpython2. For PG12 install plpython3 and make it default + # For pre12, install plpython2. For PG12 install plpython3 - if [[ $POSTGRESQL_VERSION != '12' ]]; then sudo apt-get install -y postgresql-plpython-$POSTGRESQL_VERSION && sudo pip install redis==2.4.9; else sudo apt-get install -y postgresql-plpython3-12 && pip3 install redis==2.4.9; fi; - sudo pg_dropcluster --stop $POSTGRESQL_VERSION main - sudo rm -rf /etc/postgresql/$POSTGRESQL_VERSION /var/lib/postgresql/$POSTGRESQL_VERSION diff --git a/Makefile b/Makefile index 885e0da..6660b46 100644 --- a/Makefile +++ b/Makefile @@ -135,9 +135,9 @@ include $(PGXS) PG_VERSION := $(shell $(PG_CONFIG) --version | $(AWK) '{split($$2,a,"."); print a[1]}') PG_12_GE := $(shell [ $(PG_VERSION) -ge 12 ] && echo true) -PLPYTHONU := "plpythonu" +PLPYTHONU := plpythonu ifeq ($(PG_12_GE), true) -PLPYTHONU := "plpython3u" +PLPYTHONU := plpython3u endif $(EXTENSION)--$(EXTVERSION).sql: $(CDBSCRIPTS) cartodb_version.sql Makefile diff --git a/README.md b/README.md index a871807..b4a7b8b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ See [the cartodb-postgresql wiki](https://github.com/CartoDB/cartodb-postgresql/ Dependencies ------------ - * PostgreSQL 9.6+ (with plpythonu extension and xml support) + * PostgreSQL 9.6+ (with plpythonu extension and xml support). For PostgreSQL 12+ plpython3u is required instead of plpythonu. * [PostGIS extension](http://postgis.net) * Python with [Redis module](https://pypi.org/project/redis/) diff --git a/expected/test_setup.out b/expected/test_setup.out index cb4d895..aa08fe7 100644 --- a/expected/test_setup.out +++ b/expected/test_setup.out @@ -1,6 +1,4 @@ -CREATE EXTENSION postgis; -CREATE EXTENSION plpythonu; -CREATE EXTENSION cartodb; +CREATE EXTENSION cartodb CASCADE; CREATE FUNCTION public.cdb_invalidate_varnish(table_name text) RETURNS void AS $$ BEGIN diff --git a/sql/test_setup.sql b/sql/test_setup.sql index cb4d895..aa08fe7 100644 --- a/sql/test_setup.sql +++ b/sql/test_setup.sql @@ -1,6 +1,4 @@ -CREATE EXTENSION postgis; -CREATE EXTENSION plpythonu; -CREATE EXTENSION cartodb; +CREATE EXTENSION cartodb CASCADE; CREATE FUNCTION public.cdb_invalidate_varnish(table_name text) RETURNS void AS $$ BEGIN