Re: plpgsql and logical expression evaluation - Mailing list pgsql-general

From Tom Lane
Subject Re: plpgsql and logical expression evaluation
Date
Msg-id 28885.1209049844@sss.pgh.pa.us
Whole thread Raw
In response to Re: plpgsql and logical expression evaluation  (wstrzalka <wstrzalka@gmail.com>)
List pgsql-general
wstrzalka <wstrzalka@gmail.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

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: error connecting to database: could not open relation
Next
From: Tom Lane
Date:
Subject: Re: WAL shipping with archive_timeout & pg_switch_xlog()