Can any one let me know what the differences are between WHEN CASE .. and IF/ELSE when writing in Postgres functions.
The problem is which
CASE do you mean?
CASE is an expression. It can appear inside expressions, like
A + CASE ... + B. Along with
LEAST it makes the group of conditional expressions.
CASE, along with
IF, is a control structure (a conditional). It can appear in the SQL control flow to chose what blocks/statements are executed, based on a condition.