From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgsql-committers(at)lists(dot)postgresql(dot)org, Amit Langote <amitlangote09(at)gmail(dot)com> |
Subject: | Re: pgsql: Remove some dead code in selfuncs.c |
Date: | 2023-01-19 15:45:34 |
Message-ID: | 4063400.1674143134@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> 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 relations need not recompute userid too.
This change seems rather ill-advised. The premise is false:
regression=# create user joe;
CREATE ROLE
regression=# \c - joe
You are now connected to database "regression" as user "joe".
regression=> create table joestable(f1 int) partition by range (f1);
CREATE TABLE
regression=> \c - postgres
regression=# create table joeschild partition of joestable for values from (1) to (10);
CREATE TABLE
regression=# select relname, relowner from pg_class where relname like 'joe%';
relname | relowner
-----------+----------
joeschild | 10
joestable | 39822
(2 rows)
I didn't read the actual code, so perhaps it's okay, but not if
it's doing what your commit message says.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-01-19 16:43:47 | Re: pgsql: Remove some dead code in selfuncs.c |
Previous Message | Alvaro Herrera | 2023-01-19 12:03:51 | pgsql: Remove some dead code in selfuncs.c |