Re: shortcircuit logic in plpsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: shortcircuit logic in plpsql
Date: 2006-07-19 03:29:49
Message-ID: 15179.1153279789@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joseph Shraibman <jks(at)selectacast(dot)net> writes:
> Does plpgsql not short circuit its logic?

We make no guarantees about evaluation order. In the particular
case at hand, you're losing because plpgsql has to evaluate all
the variables that it's going to pass into the SQL engine for
that expression. Break it into two statements ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message vamsee movva 2006-07-19 04:21:07 is there any dataware housing tools for postgresql
Previous Message Joseph Shraibman 2006-07-19 03:12:40 shortcircuit logic in plpsql