Fix variable for psql queries.