Postgresql Check If Table Contains Value