restoring user id and SecContext before logging error in ri_PlanCheck

Поиск
Список
Период
Сортировка
От Zhihong Yu
Тема restoring user id and SecContext before logging error in ri_PlanCheck
Дата
Msg-id CALNJ-vQJKNR45GZDRuu7xLFfBYVT2pY7ywYKMnu0qrvaC7uUow@mail.gmail.com
обсуждение исходный текст
Ответы Re: restoring user id and SecContext before logging error in ri_PlanCheck  (Zhihong Yu <zyu@yugabyte.com>)
Список pgsql-hackers
Hi,
I was looking at the code in ri_PlanCheck of src/backend/utils/adt/ri_triggers.c starting at line 2289.

When qplan is NULL, we log an error. This would skip calling SetUserIdAndSecContext().

I think the intention of the code should be restoring user id and SecContext regardless of the outcome from SPI_prepare().

If my understanding is correct, please take a look at the patch.

Thanks

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Temporary tables versus wraparound... again
Следующее
От: Zhihong Yu
Дата:
Сообщение: Re: restoring user id and SecContext before logging error in ri_PlanCheck