Re: where clause + function, execution order

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sorin Dudui <sd(at)wigeogis(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: where clause + function, execution order
Date: 2011-11-11 16:00:15
Message-ID: 5921.1321027215@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Sorin Dudui <sd(at)wigeogis(dot)com> writes:
> I am wondering when the where clause (a.x = 'value') is executed. After the select statement in the function finishes? Or is it appended at the select statement in the function?

EXPLAIN is your friend ...

In this case the function looks inline-able, so reasonably recent
versions of PG should do what you want.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Sorin Dudui 2011-11-11 16:28:04 Re: where clause + function, execution order
Previous Message Richard Huxton 2011-11-11 15:59:49 Re: where clause + function, execution order