Re: A bug with ExecCheckPermissions

2023-05-05 Thread Alvaro Herrera
On 2023-May-04, Tom Lane wrote: > It looks like this patch caused a change in the order of output from > the sepgsql tests [1]. If you expected it to re-order permissions > checking then this is probably fine, and we should just update the > expected output. Yeah, looks correct. Fix pushed. --

Re: A bug with ExecCheckPermissions

2023-05-04 Thread Tom Lane
Alvaro Herrera writes: > Thanks for looking! I have pushed it now. And many thanks to Oleg for > noticing and reporting it. It looks like this patch caused a change in the order of output from the sepgsql tests [1]. If you expected it to re-order permissions checking then this is probably fine

Re: A bug with ExecCheckPermissions

2023-05-04 Thread Alvaro Herrera
On 2023-Mar-09, Amit Langote wrote: > On Thu, Mar 9, 2023 at 7:39 PM Alvaro Herrera wrote: > > I didn't like very much this business of setting the perminfoindex > > directly to '2' and '1'. It looks ugly with no explanation. What do > > you think of creating the as we go along and set each ind

Re: A bug with ExecCheckPermissions

2023-03-09 Thread Amit Langote
Hi Alvaro, On Thu, Mar 9, 2023 at 7:39 PM Alvaro Herrera wrote: > I didn't like very much this business of setting the perminfoindex > directly to '2' and '1'. It looks ugly with no explanation. What do > you think of creating the as we go along and set each index > correspondingly, as in the a

Re: A bug with ExecCheckPermissions

2023-03-09 Thread Alvaro Herrera
I didn't like very much this business of setting the perminfoindex directly to '2' and '1'. It looks ugly with no explanation. What do you think of creating the as we go along and set each index correspondingly, as in the attached? -- Álvaro Herrera 48°01'N 7°57'E — https://www.

Re: A bug with ExecCheckPermissions

2023-02-09 Thread Amit Langote
Hi, On Thu, Feb 9, 2023 at 14:44 Sergey Shinderuk wrote: > 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 > wrote: > > > >>> I think we should also patch ExecCheckPermissions to use forboth(), > >>> scannin

Re: A bug with ExecCheckPermissions

2023-02-09 Thread Sergey Shinderuk
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 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 consisten

Re: A bug with ExecCheckPermissions

2023-02-08 Thread Alvaro Herrera
On 2023-Feb-08, Amit Langote wrote: > On Wed, Feb 8, 2023 at 16:19 Alvaro Herrera 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

Re: A bug with ExecCheckPermissions

2023-02-08 Thread Amit Langote
On Wed, Feb 8, 2023 at 16:19 Alvaro Herrera wrote: > On 2023-Feb-08, o.tselebrovs...@postgrespro.ru wrote: > > > But if you debug function ExecCheckPermissions and look into what is > passed > > to function (contents of rangeTable and rteperminfos to be exact), > > you'll see some strange behavio

Re: A bug with ExecCheckPermissions

2023-02-08 Thread Alvaro Herrera
On 2023-Feb-08, o.tselebrovs...@postgrespro.ru wrote: > But if you debug function ExecCheckPermissions and look into what is passed > to function (contents of rangeTable and rteperminfos to be exact), > you'll see some strange behaviour: > Both of RangeTableEntries have a perminfoindex of 0 and s