Thread: IMMUTABLE?
View Single Post

   
  #6 (permalink)  
Old 04-19-2008, 08:48 AM
Tom Lane
 
Posts: n/a
Default Re: IMMUTABLE?

Joachim Wieland <joe@mcknight.de> writes:
> So irrespective of caching to prevent evaluation across statements, within a
> single statement, is there a strong reason why for example in
> WHERE col = f(const) with f() declared as immutable or stable and without an
> index on col, f() still gets called for every row? Or is this optimization
> just not done yet?


The above statement is not correct, at least not for immutable functions.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Reply With Quote