pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Refactor recordExtObjInitPriv()
Date: Wed, 11 Jan 2023 16:04:37 -0800
Message-ID: <20230112000437.GA2032194@nathanxps13> (raw)
In-Reply-To: <504bc485-6bd6-dd1b-fe10-e7351aeb310d@enterprisedb.com>
References: <504bc485-6bd6-dd1b-fe10-e7351aeb310d@enterprisedb.com>

On Tue, Dec 27, 2022 at 09:56:10AM +0100, Peter Eisentraut wrote:
> Refactor recordExtObjInitPriv():  Instead of half a dozen of
> mostly-duplicate conditional branches, write one common one that can handle
> most catalogs.  We already have all the information we need, such as which
> system catalog corresponds to which catalog table and which column is the
> ACL column.

This seems reasonable.

> +	/* This will error on unsupported classoid. */
> +	else if (get_object_attnum_acl(classoid))

nitpick: I would suggest explicitly checking that it isn't
InvalidAttrNumber instead of relying on it always being 0.

> -			 classoid == AggregateRelationId ||

I noticed that AggregateRelationId isn't listed in the ObjectProperty
array, so I think recordExtObjInitPriv() will begin erroring for that
classoid instead of ignoring it like we do today.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (8+ messages)  latest in thread

Message-ID: <20230112000437.GA2032194@nathanxps13>
Permalink:  ../20230112000437.GA2032194@nathanxps13/
Also on:    postgresql.org/message-id/20230112000437.GA2032194@nathanxps13

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, peter.eisentraut@enterprisedb.com
  Subject: Re: Refactor recordExtObjInitPriv()
  In-Reply-To: <20230112000437.GA2032194@nathanxps13>

* 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