Skip to content

Commit

Permalink
chore(dwh): add pg_trgm and unaccent
Browse files Browse the repository at this point in the history
  • Loading branch information
vmttn committed Oct 2, 2023
1 parent 1f81576 commit 5ee64db
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion datawarehouse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The image:
* installs `postgis` and `plpython3u` extensions
* installs extra python requirements in a dedicated virtualenv
* makes this virtualenv available to `plpython3u`
* creates `postgis` and `plpython3u` extensions on the DB target by the `POSTGRES_DB` env variable
* creates `pg_trgm`, `unaccent`, `postgis` and `plpython3u` extensions on the DB target by the `POSTGRES_DB` env variable

## compiling the python requirements

Expand Down
10 changes: 10 additions & 0 deletions datawarehouse/docker-entrypoint-initdb.d/10_pg_trgm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e

# Perform all actions as $POSTGRES_USER
export PGUSER="$POSTGRES_USER"

"${psql[@]}" --dbname="$POSTGRES_DB" <<- 'EOSQL'
CREATE EXTENSION IF NOT EXISTS pg_trgm;
EOSQL
10 changes: 10 additions & 0 deletions datawarehouse/docker-entrypoint-initdb.d/10_unaccent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e

# Perform all actions as $POSTGRES_USER
export PGUSER="$POSTGRES_USER"

"${psql[@]}" --dbname="$POSTGRES_DB" <<- 'EOSQL'
CREATE EXTENSION IF NOT EXISTS unaccent;
EOSQL

0 comments on commit 5ee64db

Please sign in to comment.