case when ('yes'= lower($1)) then (phone_number is not null) when ('no'=lower($1)) then (phone_number is null) else true end
I was always under the impression that a case expression could only be on the right side of a where expression ie:
WHERE fieldname=<cse expression>
Is this a postgres extention, cant find any documentation on this
thanks
Mike
pgsql-sql by date:
Соглашаюсь с условиями обработки персональных данных