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  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 ?

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: unexpected psql "feature"
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Issue in pg_catalog.pg_indexes view definition