wstrzalka <wstrzalka(at)gmail(dot)com> writes:
> So - does it mean that the whole IF-ELSE-ENDIF is not parsed at once -
> but lazy-parsed when the control reaches it, while the IF condition is
> parsed as a single expression and therefore I get error in this case?
Right, for a suitable definition of "parsed". There is some trivial
syntax checking that happens early (eg, you'll see complaints for
mismatched parentheses) but actually trying to determine the meaning
of an expression happens when control first gets there.
regards, tom lane