Properly escape psql command.