simplification de l'échappement pour PG

This commit is contained in:
Jérémy Lecour 2018-09-10 22:44:06 +02:00
parent e67b65def2
commit 7809a360eb

View file

@ -81,7 +81,7 @@ if test -x "${GIT_BIN}"; then
fi
# insert into PG
SQL_TEXTE=`echo "${TEXTE}" | sed "s/'/\\\\\\'/g ; s@/@\\\\\/@g ; s@\\&@et@g"`
SQL_TEXTE=$(echo "${TEXTE}" | sed "s/'/''/g")
echo "
INSERT INTO evomaint(hostname,userid,ipaddress,begin_date,end_date,details)