Skip to content

Commit 892e29b

Browse files
authored
Merge pull request #395 from ImreSamu/20240414_update_PostGIS3.5_debian
Update to PostGIS 3.5 debian
2 parents 46c5548 + 107288e commit 892e29b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+232
-90
lines changed

.github/workflows/main.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
postgres: [12, 13, 14, 15, 16, 17]
19-
postgis: ['3.4']
19+
postgis: ['3.5']
2020
variant: [default, alpine]
2121
include:
2222
- postgres: 16
@@ -25,12 +25,6 @@ jobs:
2525
- postgres: 17
2626
postgis: master
2727
variant: default
28-
- postgres: 16
29-
postgis: 3.5
30-
variant: alpine
31-
- postgres: 17
32-
postgis: 3.5
33-
variant: alpine
3428

3529
name: Build docker image for ${{ matrix.postgres }}-${{ matrix.postgis }} variant ${{ matrix.variant }}
3630
runs-on: ubuntu-20.04

12-3.4/Dockerfile renamed to 12-3.5/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
FROM postgres:12-bullseye
66

77
LABEL maintainer="PostGIS Project - https://postgis.net" \
8-
org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 12 bullseye" \
8+
org.opencontainers.image.description="PostGIS 3.5.0+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 12 bullseye" \
99
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
1010

1111
ENV POSTGIS_MAJOR 3
12-
ENV POSTGIS_VERSION 3.4.3+dfsg-2.pgdg110+1
12+
ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1
1313

1414
RUN apt-get update \
1515
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

12-3.4/alpine/Dockerfile renamed to 12-3.5/alpine/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:12-alpine3.20
55
FROM ${BASE_IMAGE}
66

77
LABEL maintainer="PostGIS Project - https://postgis.net" \
8-
org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 12 Alpine" \
8+
org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 12 Alpine" \
99
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
1010

11-
ENV POSTGIS_VERSION 3.4.3
12-
ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b
11+
ENV POSTGIS_VERSION 3.5.0
12+
ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316
1313

1414
RUN set -eux \
1515
&& apk add --no-cache --virtual .fetch-deps \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

13-3.4/Dockerfile renamed to 13-3.5/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
FROM postgres:13-bullseye
66

77
LABEL maintainer="PostGIS Project - https://postgis.net" \
8-
org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 13 bullseye" \
8+
org.opencontainers.image.description="PostGIS 3.5.0+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 13 bullseye" \
99
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
1010

1111
ENV POSTGIS_MAJOR 3
12-
ENV POSTGIS_VERSION 3.4.3+dfsg-2.pgdg110+1
12+
ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1
1313

1414
RUN apt-get update \
1515
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

13-3.4/alpine/Dockerfile renamed to 13-3.5/alpine/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:13-alpine3.20
55
FROM ${BASE_IMAGE}
66

77
LABEL maintainer="PostGIS Project - https://postgis.net" \
8-
org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 13 Alpine" \
8+
org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 13 Alpine" \
99
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
1010

11-
ENV POSTGIS_VERSION 3.4.3
12-
ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b
11+
ENV POSTGIS_VERSION 3.5.0
12+
ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316
1313

1414
RUN set -eux \
1515
&& apk add --no-cache --virtual .fetch-deps \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

14-3.4/Dockerfile renamed to 14-3.5/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
FROM postgres:14-bullseye
66

77
LABEL maintainer="PostGIS Project - https://postgis.net" \
8-
org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 14 bullseye" \
8+
org.opencontainers.image.description="PostGIS 3.5.0+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 14 bullseye" \
99
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
1010

1111
ENV POSTGIS_MAJOR 3
12-
ENV POSTGIS_VERSION 3.4.3+dfsg-2.pgdg110+1
12+
ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1
1313

1414
RUN apt-get update \
1515
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

14-3.4/alpine/Dockerfile renamed to 14-3.5/alpine/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:14-alpine3.20
55
FROM ${BASE_IMAGE}
66

77
LABEL maintainer="PostGIS Project - https://postgis.net" \
8-
org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 14 Alpine" \
8+
org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 14 Alpine" \
99
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
1010

11-
ENV POSTGIS_VERSION 3.4.3
12-
ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b
11+
ENV POSTGIS_VERSION 3.5.0
12+
ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316
1313

1414
RUN set -eux \
1515
&& apk add --no-cache --virtual .fetch-deps \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

15-3.4/Dockerfile renamed to 15-3.5/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
FROM postgres:15-bullseye
66

77
LABEL maintainer="PostGIS Project - https://postgis.net" \
8-
org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 15 bullseye" \
8+
org.opencontainers.image.description="PostGIS 3.5.0+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 15 bullseye" \
99
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
1010

1111
ENV POSTGIS_MAJOR 3
12-
ENV POSTGIS_VERSION 3.4.3+dfsg-2.pgdg110+1
12+
ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1
1313

1414
RUN apt-get update \
1515
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

15-3.4/alpine/Dockerfile renamed to 15-3.5/alpine/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:15-alpine3.20
55
FROM ${BASE_IMAGE}
66

77
LABEL maintainer="PostGIS Project - https://postgis.net" \
8-
org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 15 Alpine" \
8+
org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 15 Alpine" \
99
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
1010

11-
ENV POSTGIS_VERSION 3.4.3
12-
ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b
11+
ENV POSTGIS_VERSION 3.5.0
12+
ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316
1313

1414
RUN set -eux \
1515
&& apk add --no-cache --virtual .fetch-deps \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

16-3.5/Dockerfile

+28-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1-
# placeholder Dockerfile
2-
# Debian version of postgis is not detected!
3-
# This is an autogenerated message of ./update.sh
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
3+
#
4+
5+
FROM postgres:16-bullseye
6+
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.5.0+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 16 bullseye" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
10+
11+
ENV POSTGIS_MAJOR 3
12+
ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1
13+
14+
RUN apt-get update \
15+
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
16+
&& apt-get install -y --no-install-recommends \
17+
# ca-certificates: for accessing remote raster files;
18+
# fix: https://github.com/postgis/docker-postgis/issues/307
19+
ca-certificates \
20+
\
21+
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \
22+
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
23+
&& rm -rf /var/lib/apt/lists/*
24+
25+
RUN mkdir -p /docker-entrypoint-initdb.d
26+
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
27+
COPY ./update-postgis.sh /usr/local/bin
28+
File renamed without changes.
File renamed without changes.

16-master/Dockerfile

+13-15
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05.
77

88
ARG DOCKER_CMAKE_BUILD_TYPE=Release
9-
ARG CGAL_GIT_BRANCH=5.6.x-branch
9+
ARG CGAL_GIT_BRANCH=master
1010
FROM postgres:16-bullseye as builder
1111

1212
LABEL maintainer="PostGIS Project - https://postgis.net" \
@@ -84,18 +84,16 @@ ARG DOCKER_CMAKE_BUILD_TYPE
8484
ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE}
8585

8686
# cgal & sfcgal
87-
# By utilizing the latest commit of the CGAL 5.x.x-branch and implementing a header-only build for SFCGAL,
88-
# one can benefit from the latest CGAL patches while avoiding compatibility issues.
8987
ARG CGAL_GIT_BRANCH
9088
ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH}
91-
ENV CGAL5X_GIT_HASH f1af52edeb741a05f86d959984ed943f25f5fcd4
92-
ENV SFCGAL_GIT_HASH 88ec10481fc51efb4d232fd2f45bb556120a6f4c
89+
ENV CGAL_GIT_HASH a98031649b4d9bd61ea2934204b523d0d8a9e633
90+
ENV SFCGAL_GIT_HASH c92aa736e1f22422b8fd4ac6eba2e041b74d3a29
9391
RUN set -ex \
9492
&& mkdir -p /usr/src \
9593
&& cd /usr/src \
9694
&& git clone --branch ${CGAL_GIT_BRANCH} https://github.com/CGAL/cgal \
9795
&& cd cgal \
98-
&& git checkout ${CGAL5X_GIT_HASH} \
96+
&& git checkout ${CGAL_GIT_HASH} \
9997
&& git log -1 > /_pgis_cgal_last_commit.txt \
10098
&& cd /usr/src \
10199
&& git clone https://gitlab.com/SFCGAL/SFCGAL.git \
@@ -122,7 +120,7 @@ RUN set -ex \
122120
&& rm -fr /usr/src/cgal
123121

124122
# proj
125-
ENV PROJ_GIT_HASH d19ab643b9825bf4de5ff336e228b9abc06e2991
123+
ENV PROJ_GIT_HASH 54a7662dbc52963da70303ac8c9124966f4cf6b4
126124
RUN set -ex \
127125
&& cd /usr/src \
128126
&& git clone https://github.com/OSGeo/PROJ.git \
@@ -152,7 +150,7 @@ RUN set -ex \
152150
&& rm -fr /usr/src/PROJ
153151

154152
# geos
155-
ENV GEOS_GIT_HASH e142764b77f4b8d0c36ec88406300c5f876743fb
153+
ENV GEOS_GIT_HASH d7c51c401213d11f5dafd56596295274433379b6
156154
RUN set -ex \
157155
&& cd /usr/src \
158156
&& git clone https://github.com/libgeos/geos.git \
@@ -168,7 +166,7 @@ RUN set -ex \
168166
&& rm -fr /usr/src/geos
169167

170168
# gdal
171-
ENV GDAL_GIT_HASH 91bfec36a4dc03cfba554e6197a83099d9ec122a
169+
ENV GDAL_GIT_HASH 014581eece0d174ac283691e855c5f370a73d990
172170
RUN set -ex \
173171
&& cd /usr/src \
174172
&& git clone https://github.com/OSGeo/gdal.git \
@@ -301,11 +299,11 @@ COPY --from=builder /usr/local /usr/local
301299

302300
ARG CGAL_GIT_BRANCH
303301
ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH}
304-
ENV CGAL5X_GIT_HASH f1af52edeb741a05f86d959984ed943f25f5fcd4
305-
ENV SFCGAL_GIT_HASH 88ec10481fc51efb4d232fd2f45bb556120a6f4c
306-
ENV PROJ_GIT_HASH d19ab643b9825bf4de5ff336e228b9abc06e2991
307-
ENV GEOS_GIT_HASH e142764b77f4b8d0c36ec88406300c5f876743fb
308-
ENV GDAL_GIT_HASH 91bfec36a4dc03cfba554e6197a83099d9ec122a
302+
ENV CGAL_GIT_HASH a98031649b4d9bd61ea2934204b523d0d8a9e633
303+
ENV SFCGAL_GIT_HASH c92aa736e1f22422b8fd4ac6eba2e041b74d3a29
304+
ENV PROJ_GIT_HASH 54a7662dbc52963da70303ac8c9124966f4cf6b4
305+
ENV GEOS_GIT_HASH d7c51c401213d11f5dafd56596295274433379b6
306+
ENV GDAL_GIT_HASH 014581eece0d174ac283691e855c5f370a73d990
309307

310308
# Minimal command line test ( fail fast )
311309
RUN set -ex \
@@ -324,7 +322,7 @@ RUN set -ex \
324322
|| echo "ogr2ogr missing PostgreSQL driver" && exit 1
325323

326324
# install postgis
327-
ENV POSTGIS_GIT_HASH b28f00c3efd772460714cb9db30b0dc9a0ff27fd
325+
ENV POSTGIS_GIT_HASH 77bcee79332a82a5b5fc7ae6ae47470939a855fa
328326

329327
RUN set -ex \
330328
&& apt-get update \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

17-3.5/17-3.4/initdb-postgis.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Perform all actions as $POSTGRES_USER
6+
export PGUSER="$POSTGRES_USER"
7+
8+
# Create the 'template_postgis' template db
9+
"${psql[@]}" <<- 'EOSQL'
10+
CREATE DATABASE template_postgis IS_TEMPLATE true;
11+
EOSQL
12+
13+
# Load PostGIS into both template_database and $POSTGRES_DB
14+
for DB in template_postgis "$POSTGRES_DB"; do
15+
echo "Loading PostGIS extensions into $DB"
16+
"${psql[@]}" --dbname="$DB" <<-'EOSQL'
17+
CREATE EXTENSION IF NOT EXISTS postgis;
18+
CREATE EXTENSION IF NOT EXISTS postgis_topology;
19+
-- Reconnect to update pg_setting.resetval
20+
-- See https://github.com/postgis/docker-postgis/issues/288
21+
\c
22+
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
23+
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
24+
EOSQL
25+
done

17-3.5/17-3.4/update-postgis.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
# Perform all actions as $POSTGRES_USER
6+
export PGUSER="$POSTGRES_USER"
7+
8+
POSTGIS_VERSION="${POSTGIS_VERSION%%+*}"
9+
10+
# Load PostGIS into both template_database and $POSTGRES_DB
11+
for DB in template_postgis "$POSTGRES_DB" "${@}"; do
12+
echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION"
13+
psql --dbname="$DB" -c "
14+
-- Upgrade PostGIS (includes raster)
15+
CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION';
16+
ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION';
17+
18+
-- Upgrade Topology
19+
CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION';
20+
ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION';
21+
22+
-- Install Tiger dependencies in case not already installed
23+
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
24+
-- Upgrade US Tiger Geocoder
25+
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION';
26+
ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION';
27+
"
28+
done

17-3.5/Dockerfile

+28-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1-
# placeholder Dockerfile
2-
# Debian version of postgis is not detected!
3-
# This is an autogenerated message of ./update.sh
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
3+
#
4+
5+
FROM postgres:17-bullseye
6+
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.5.0+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 17 bullseye" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
10+
11+
ENV POSTGIS_MAJOR 3
12+
ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1
13+
14+
RUN apt-get update \
15+
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
16+
&& apt-get install -y --no-install-recommends \
17+
# ca-certificates: for accessing remote raster files;
18+
# fix: https://github.com/postgis/docker-postgis/issues/307
19+
ca-certificates \
20+
\
21+
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \
22+
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
23+
&& rm -rf /var/lib/apt/lists/*
24+
25+
RUN mkdir -p /docker-entrypoint-initdb.d
26+
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
27+
COPY ./update-postgis.sh /usr/local/bin
28+

17-3.5/initdb-postgis.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Perform all actions as $POSTGRES_USER
6+
export PGUSER="$POSTGRES_USER"
7+
8+
# Create the 'template_postgis' template db
9+
"${psql[@]}" <<- 'EOSQL'
10+
CREATE DATABASE template_postgis IS_TEMPLATE true;
11+
EOSQL
12+
13+
# Load PostGIS into both template_database and $POSTGRES_DB
14+
for DB in template_postgis "$POSTGRES_DB"; do
15+
echo "Loading PostGIS extensions into $DB"
16+
"${psql[@]}" --dbname="$DB" <<-'EOSQL'
17+
CREATE EXTENSION IF NOT EXISTS postgis;
18+
CREATE EXTENSION IF NOT EXISTS postgis_topology;
19+
-- Reconnect to update pg_setting.resetval
20+
-- See https://github.com/postgis/docker-postgis/issues/288
21+
\c
22+
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
23+
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
24+
EOSQL
25+
done

17-3.5/update-postgis.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
# Perform all actions as $POSTGRES_USER
6+
export PGUSER="$POSTGRES_USER"
7+
8+
POSTGIS_VERSION="${POSTGIS_VERSION%%+*}"
9+
10+
# Load PostGIS into both template_database and $POSTGRES_DB
11+
for DB in template_postgis "$POSTGRES_DB" "${@}"; do
12+
echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION"
13+
psql --dbname="$DB" -c "
14+
-- Upgrade PostGIS (includes raster)
15+
CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION';
16+
ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION';
17+
18+
-- Upgrade Topology
19+
CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION';
20+
ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION';
21+
22+
-- Install Tiger dependencies in case not already installed
23+
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
24+
-- Upgrade US Tiger Geocoder
25+
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION';
26+
ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION';
27+
"
28+
done

0 commit comments

Comments
 (0)