Re: how to evaluate a function only once for a query?
От | Nicolae Mihalache |
---|---|
Тема | Re: how to evaluate a function only once for a query? |
Дата | |
Msg-id | 3D11DCC7.60402@abcpages.com обсуждение исходный текст |
Ответ на | how to evaluate a function only once for a query? (Nicolae Mihalache <mache@abcpages.com>) |
Ответы |
Re: how to evaluate a function only once for a query?
|
Список | pgsql-general |
Tom Lane 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 thanks for your quick answer. I'm tring to use this attribute but I get an error: robust=# create function testfunc () returns text as '' language 'pltcl' with iscachable; ERROR: parser: parse error at or near "iscachable" any ideea? Is it possible that my postgres 7.2.1 does not support this attrributes? I also get error if I'm tring to use the other attribute "isstrict" Thanks, Nicolae Mihalache
В списке pgsql-general по дате отправления: