Skip to content

Commit

Permalink
fix timescaledb being picked up from apt
Browse files Browse the repository at this point in the history
We want timescaledb packages from dedicated repo, where we have all versions
  • Loading branch information
georgebarbarosie authored Jun 12, 2024
1 parent 2ca7077 commit 2cc31e6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions install_pg_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ set -euxo pipefail
# install extensions
EXTENSIONS="$@"
# cycle through extensions list
for EXTENSION in ${EXTENSIONS}; do
# is it an extension found in apt?
if apt-cache show "postgresql-${PG_MAJOR}-${EXTENSION}" &> /dev/null; then
# install the extension
apt-get install -y "postgresql-${PG_MAJOR}-${EXTENSION}"
continue
fi

for EXTENSION in ${EXTENSIONS}; do
# special case: timescaledb
if [ "$EXTENSION" == "timescaledb" ]; then
# dependencies
Expand Down Expand Up @@ -41,6 +34,13 @@ for EXTENSION in ${EXTENSIONS}; do
continue
fi

# is it an extension found in apt?
if apt-cache show "postgresql-${PG_MAJOR}-${EXTENSION}" &> /dev/null; then
# install the extension
apt-get install -y "postgresql-${PG_MAJOR}-${EXTENSION}"
continue
fi

# extension not found/supported
echo "Extension '${EXTENSION}' not found/supported"
exit 1
Expand Down

0 comments on commit 2cc31e6

Please sign in to comment.