Having previously on this list displayed my ignorance
of the true nature of "iscachable", I had thought that
I had it straight. The response below has brought
back this bad memory, and now prompts me to check
again:
The only way that "iscachable" would prevent the need
for reevaluation on every row is by permitting the
creation of an index on the function return values
(which step I assume is implicit in the response
below).
Right?
--- Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Nicolae Mihalache <mache@abcpages.com> writes:
> > I've created a function timevalue(text) that
> returns a timestamp as
> > result. The function works just fine.
> > However, when I do a query like:
> > "select * from mytable where
> time<timevalue('something')" I see that my
> > function is evaluated once for each row in
> mytable.
>
> See the "isCachable" attribute in CREATE FUNCTION.
>
> regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com