Re: pgsql: Remove some dead code in selfuncs.c

2023-01-19 Thread Tom Lane
Alvaro Herrera writes: > On 2023-Jan-19, Tom Lane wrote: >> Ah, sorry, -ENOCAFFEINE. It's talking about the access-as-user field, >> not the relation's owner. I agree that as querytrees are currently >> built, this is probably a safe optimization. But do we really want >> to hard-wire such a su

Re: pgsql: Remove some dead code in selfuncs.c

2023-01-19 Thread Alvaro Herrera
On 2023-Jan-19, Tom Lane wrote: > I wrote: > > Alvaro Herrera writes: > >> Remove some dead code in selfuncs.c > >> RelOptInfo.userid is the same for all relations in a given inheritance > >> tree, so the code in examine_variable() and example_simple_variable() > >> that repeats the ACL checks on

Re: pgsql: Remove some dead code in selfuncs.c

2023-01-19 Thread Tom Lane
I wrote: > Alvaro Herrera writes: >> Remove some dead code in selfuncs.c >> RelOptInfo.userid is the same for all relations in a given inheritance >> tree, so the code in examine_variable() and example_simple_variable() >> that repeats the ACL checks on the root parent rel instead of a given >> le

Re: pgsql: Remove some dead code in selfuncs.c

2023-01-19 Thread Tom Lane
Alvaro Herrera writes: > Remove some dead code in selfuncs.c > RelOptInfo.userid is the same for all relations in a given inheritance > tree, so the code in examine_variable() and example_simple_variable() > that repeats the ACL checks on the root parent rel instead of a given > leaf child relatio

pgsql: Remove some dead code in selfuncs.c

2023-01-19 Thread Alvaro Herrera
Remove some dead code in selfuncs.c RelOptInfo.userid is the same for all relations in a given inheritance tree, so the code in examine_variable() and example_simple_variable() that repeats the ACL checks on the root parent rel instead of a given leaf child relations need not recompute userid too.