From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@lists.postgresql.org, Amit Langote <amitlangote09@gmail.com>
Subject: Re: pgsql: Remove some dead code in selfuncs.c
Date: Thu, 19 Jan 2023 10:45:34 -0500
Message-ID: <4063400.1674143134@sss.pgh.pa.us> (raw)
In-Reply-To: <E1pITe3-004ReV-5B@gemulon.postgresql.org>
References: <E1pITe3-004ReV-5B@gemulon.postgresql.org>
Alvaro Herrera <alvherre@alvh.no-ip.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, amitlangote09@gmail.com
Subject: Re: pgsql: Remove some dead code in selfuncs.c
In-Reply-To: <4063400.1674143134@sss.pgh.pa.us>
References: <E1pITe3-004ReV-5B@gemulon.postgresql.org> <4063400.1674143134@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox