Fix for PostgreSQL databases with dashes in the name

Fixes this error: psycopg2.ProgrammingError: syntax error at or near "-"