title: escape single quotes in the string templates when env variables are passed to psql
body: <p>I'm passing env variables from .env file to my bash script and I want to run psql command. Unfortunatelly I'm struggling with a correct string template so my psql always fails.</p>
  <pre><code>#!/bin/bash
  set -o allexport
  source .env
  
  if [[ $SHOULD_UPDATE_CONTENT==1 ]]
  then
    # 1. Truncate all the tables before inserting data
    r=&quot;select $DB_SCHEMA.truncate_tables('user','$DB_SCHEMA');&quot;
    docker exec $CONTAINER_NAME psql -U dev -d data -v ON_ERROR_STOP=1 -c &quot;${r}&quot;
  fi
  
  set +o allexport
  
  </code></pre>
  <p>.env</p>
  <pre><code>DB_HOST=db
  DB_PORT=5432
  DB_DATABASE=dbTest
  DB_SCHEMA=schema
  SHOULD_UPDATE_CONTENT=1
  </code></pre>