diff --git a/entrypoint.sh b/entrypoint.sh
index 5b7742662c95cef5917ec595699a0a5825048254..c6c31ca9b86a6776d35c34336af0202efde5ac65 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -36,7 +36,7 @@ while true; do
     sleep 1
 done
 
-if ! psql --list 2> /dev/null | grep $PGDATABASE > /dev/null 2>&1; then
+if ! psql --list --no-align --tuples-only 2> /dev/null | grep ^$PGDATABASE\| > /dev/null 2>&1; then
   	echo "Database $PGDATABASE does not exist"
   	DB_ARGS+=("--load-language")
   	DB_ARGS+=("fr_FR")