Postgres Function Check If Table Exists In Sql