Re: Can this function be declared IMMUTABLE?

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Can this function be declared IMMUTABLE?
Дата
Msg-id 87ps17lavh.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: Can this function be declared IMMUTABLE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> beickhof@Lexmark.com writes:
>> Well, I am considering a function that does select from a table, but the
>> table contents change extremely infrequently (the table is practically a
>> list of constants).  Would it be safe to declare the function IMMUTABLE
>> provided that the table itself is endowed with a trigger that will drop
>> and recreate the function any time the table contents are modified?
>
> What you'd want to do is restart all existing sessions so that any plans
> made using precomputed function values are discarded.  The trigger you
> suggest is fairly pointless because it will not cause regeneration of
> plans.

The trigger would alert him if there were any indexes built using the
function...


--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PickSplit method of 2 columns ... error
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Seeking datacenter PITR backup suggestions