Re: Issue in pg_catalog.pg_indexes view definition
От | Dilip Kumar |
---|---|
Тема | Re: Issue in pg_catalog.pg_indexes view definition |
Дата | |
Msg-id | CAFiTN-t5amfEtmz0RBtTVVtD9whd=-g_RYOHaXSAp-oVVvjUAA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Issue in pg_catalog.pg_indexes view definition (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
Ответы |
Re: Issue in pg_catalog.pg_indexes view definition
|
Список | pgsql-hackers |
On Thu, Jul 14, 2016 at 1:37 PM, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote:
Can we say that pg_get_indexdef() has "side-effects" because it can error
like this? Shouldn't such a function be marked *volatile*? Because if I
do so by updating pg_proc, the plan changes (perhaps) to a safe one in
this context:
That is another option, but by nature this function is not actually volatile, because if clause is on pg_index indexrelid then it can be pushed down.
So I think changing the view definition and calling this function on indexrelid will remove the error. So I think
correct fix is to change view definition, as I proposed in above patch.
Any other opinion on this ?
В списке pgsql-hackers по дате отправления: