Re: STABLE functions - Mailing list pgsql-hackers

From Philip Warner
Subject Re: STABLE functions
Date
Msg-id 5.1.0.14.0.20030427115157.02a599d8@mail.rhyme.com.au
Whole thread Raw
In response to Re: STABLE functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: STABLE functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 11:13 AM 25/04/2003 -0400, Tom Lane wrote:
>The point is that the system *may* choose to evaluate f() only once,
>not that it *must* do so.  The classification exists to make it valid
>to use an indexscan on "col".

So just for my own understanding, the optimizer does not know that it can 
treat a STABLE function f as constant inside an outer loop of t1 in this query:
    select * from t1,t2 where t2.f1 = f(t1.f1)




----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 03 5330 3172          |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: conflicting libraries at runtime
Next
From: Tatsuo Ishii
Date:
Subject: current breakage with PGCLIENTENCODING