On Thursday 20 Jun 2002 11:40 am, Nicolae Mihalache wrote:
> 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. The problem is that
> it will return each time the same value (because the argument is
> constant)
Try marking the function "iscachable" when you define it - it's designed for
exactly this situation and says that for any fixed argument your function
will return a fixed result.. I don't use pltcl but I believe that works
regardless of the function language. See the manuals for CREATE FUNCTION for
further details.
- Richard Huxton