david@gardnerit.net writes:
> First does pl/pgSQL do short circuit evaluation?
Not in the sense you're looking for. The entire IF expression is passed
to the evaluator at once and all the plpgsql-level variables in it have
to be available at the start.
regards, tom lane