make SQL specific to MYSQL work with Postgres as well