Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Re: A bug with ExecCheckPermissions

Поиск
Список
Период
Сортировка
От Sergey Shinderuk
Тема Re: A bug with ExecCheckPermissions
Дата
Msg-id 03cac228-9bcc-00ee-ff76-c097c7dea493@postgrespro.ru
обсуждение исходный текст
Ответ на Re: A bug with ExecCheckPermissions  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: A bug with ExecCheckPermissions
Список pgsql-hackers
On 08.02.2023 21:23, Alvaro Herrera wrote:
> On 2023-Feb-08, Amit Langote wrote:
> 
>> On Wed, Feb 8, 2023 at 16:19 Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> 
>>> I think we should also patch ExecCheckPermissions to use forboth(),
>>> scanning the RTEs as it goes over the perminfos, and make sure that the
>>> entries are consistent.
>>
>> Hmm, we can’t use forboth here, because not all RTEs have the corresponding
>> RTEPermissionInfo, inheritance children RTEs, for example.
> 
> Doh, of course.
> 
>> Also, it doesn’t make much sense to reinstate the original loop over
>> range table and fetch the RTEPermissionInfo for the RTEs with non-0
>> perminfoindex, because the main goal of the patch was to make
>> ExecCheckPermissions() independent of range table length.
> 
> Yeah, I'm thinking in a mechanism that would allow us to detect bugs in
> development builds — no need to have it run in production builds.
> However, I can't see any useful way to implement it.
>


Maybe something like the attached would do?


-- 
Sergey Shinderuk        https://postgrespro.com/

Вложения

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