Re: Users/Roles do not align.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Jürgen Purtz <juergen(at)purtz(dot)de>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Users/Roles do not align.
Date: 2020-03-10 02:50:26
Message-ID: 20200310025026.GA27552@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, Feb 6, 2020 at 11:06:44AM +0100, Jürgen Purtz wrote:
>
> > There's a few things wrong about this part anyway- namely that we've got
> > FDWs now, and there's certainly other cluster-wide things that exist
> > beyond the specific items listed, so I wonder if perhaps we should just
> > stop trying to list everything here.
>
> Inspiring answer! After some inquiry I became aware, that we do not have
> only 2 levels of 'belong-to' but 3: tables, views, operators, and much more
> objects belong to a schema; schemata, extensions (e.g. FDW), and more(?)
> belong to a database; databases, roles, tablespaces, and more belong to a
> cluster. Two aspects of 'belong-to' are: object names are unique within
> their level, and objects are automatically known everywhere within their
> level.
>
> Information about such dependencies and their consequences is spread across
> different chapters of the documentation and the System Catalog. Of course
> the chapter about roles/users is not suitable to explain the details. But
> it's important to know the hierarchy, it shut be summarized somewhere.

I developed the attached patch to address this suggestion. FYI, you can
list global objects using this query:

SELECT relname
FROM pg_class JOIN pg_tablespace ON (reltablespace = pg_tablespace.oid)
WHERE relkind = 'r' and spcname = 'pg_global';
relname
-----------------------
pg_authid
pg_subscription
pg_database
pg_db_role_setting
pg_tablespace
pg_auth_members
pg_shdepend
pg_shdescription
pg_replication_origin
pg_shseclabel

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

Attachment Content-Type Size
global.diff text/x-diff 2.8 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2020-03-10 10:26:51 Inherited tables cannot be partitioned (version 12.0)
Previous Message Tom Lane 2020-03-09 16:29:44 Re: invalid parser name