Postgres Function If In Excel