Question about IMMUTABLE function

Поиск
Список
Период
Сортировка
От petrov.boris.v@mail.ru
Тема Question about IMMUTABLE function
Дата
Msg-id 564B69E2.7040209@mail.ru
обсуждение исходный текст
Ответы Re: Question about IMMUTABLE function  ("petrov.boris.v@mail.ru" <petrov.boris.v@mail.ru>)
Список pgsql-novice
Hi
Documentation states, that IMMUTABLE "... guaranteed to return the same
results given the same arguments forever." My doubts are regarding
'forever' word.
Q1: Can I safely mark as IMMUTABLE
     FUNCTION calc_col_gen_full_weburl(content_pages_table)
Which is used in following context:
     SELECT p.id, p.calc_col_gen_full_weburl FROM content_pages_table;
Given that:
     1. It internally does SELECT. It looks at other rows in the same
table (parent rows, to generate full url). And these rows may be updated
some day. So it should return new value for row#5 if row#3 will be changed.
     2. It in turn calls other function that is really IMMUTABLE (say
my_char_replace()) and does not selects from anywhere. But, the
implementation of that (my_char_replace()) function may be changed
someday (it will be recreated).




В списке pgsql-novice по дате отправления:

Предыдущее
От: Felipe Santos
Дата:
Сообщение: Re: [pgsql-novice] Daily digest v1.3706 (6 messages)
Следующее
От: "petrov.boris.v@mail.ru"
Дата:
Сообщение: Re: Question about IMMUTABLE function