quote PG variables

This commit is contained in:
Jérémy Lecour 2019-03-10 00:40:46 +01:00
parent 6568e66f73
commit e31e5c73df

View file

@ -200,7 +200,7 @@ hook_db() {
printf "\n\n********** DB query **************\n%s\n***********************************\n" "${PG_QUERY}"
fi
if [ "${DRY_RUN}" != "1" ]; then
echo "${PG_QUERY}" | psql ${PGDB} ${PGTABLE} -h ${PGHOST}
echo "${PG_QUERY}" | psql "${PGDB}" "${PGTABLE}" -h "${PGHOST}"
fi
}