Re: tsearch comments
От | Bjorn Metzdorf |
---|---|
Тема | Re: tsearch comments |
Дата | |
Msg-id | 00d801c2c2cc$1a02e730$81c206d4@office.turtleentertainment.de обсуждение исходный текст |
Ответ на | Re: tsearch comments (Oleg Bartunov <oleg@sai.msu.su>) |
Ответы |
Re: tsearch comments
|
Список | pgsql-general |
> Do index functions always have to be marked "iscachable" ? > > Btw, the error message was confusing. It said that the function has to be > marked "isImmutable", but there is no such attribute, instead "iscachable" > had to be used. This seems to be a bug. The manual says: "All functions and operators used in an index definition must be immutable, that is, their results must depend only on their input arguments and never on any outside influence (such as the contents of another table or the current time). This restriction ensures that the behavior of the index is well-defined. To use a user-defined function in an index, remember to mark the function immutable when you create it." Well, in the tsearch case the results don't depend on any influence outside of the function. The stemmer is integrated in the function and we don't use the current time nor another table. So it should be safe to mark that function "iscachable" or when it is fixed "isimmutable", am I right? Regards, Bjoern
В списке pgsql-general по дате отправления: