At 19:05 18/09/00 +1000, Philip Warner wrote:
>
>I guess an alternative would be to define a special 'iscacheable' function:
>eg.
>
>   function constant(arg <all-types>) returns <same-type-as-arg>
>
>so we could have:
>
>    field < constant(current_timestamp - interval '1 hour')
>
>although this looks suspiciously like an optimizer hint which I think
>people have been opposed to in the past...
>

I just saw the flaw with this: iscacheable is not enough when the args are
deemed non-constant. I guess we'd need some kind of 'evaluate_once' flag,
which is getting a little obtuse.

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

Reply via email to