| От | Tom Lane |
|---|---|
| Тема | Re: Changing the function used in an index. |
| Дата | |
| Msg-id | 21420.1373644747@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Changing the function used in an index. (Clodoaldo Neto <clodoaldo.pinto.neto@gmail.com>) |
| Список | pgsql-general |
Clodoaldo Neto <clodoaldo.pinto.neto@gmail.com> writes:
> How does the planner know that the function used in an index has changed?
> If the function's body is changed keeping the argument and return types the
> planner will not use it anymore:
Ordinarily, changing a function definition like that *would* break
things. The only thing that's saving you from yourself in this example
is that the function is inline-able SQL, and so what the planner is
seeing is not "f(i)" vs "f(i)", but "i * -1" vs just "i". Even so,
the index is broken/corrupt, or will be as soon as you make more
insertions into it with the changed function.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера