Fixing table existence check for Postgres.