Re: table inheritance and privileges

From: Ted Toth <txtoth(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: table inheritance and privileges
Date: 2022-09-28 21:42:13
Message-ID: CAFPpqQEZMfO09XekUkDuPCu7E-JowZT=t=_=dAbx41Uznx840g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have written a 'before insert' trigger using a similar technique to
that described in section 5.11.3 of :
https://www.postgresql.org/docs/14/ddl-partitioning.html#DDL-PARTITIONING-USING-INHERITANCE

However my trigger queries to see if the partition table exists,
creates it if it doesn't then inserts into it and returns 'SKIP'
(plpython3u).

On Wed, Sep 28, 2022 at 2:49 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Ted Toth <txtoth(at)gmail(dot)com> writes:
> > I'm dynamically creating tables that inherit from another table but
> > they don't inherit the access privileges. Is there a way to have the
> > new tables inherit their parent tables access privileges?
>
> No, but do you need that? When accessing the parent table, there's
> no need for privileges on individual children --- we only check
> tables(s) directly named in the query.
>
> regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-09-29 03:02:24 Re: Streaming wal from primiry terminating
Previous Message Peter J. Holzer 2022-09-28 20:03:17 Re: Limiting the operations that client-side code can perform upon its database backend's artifacts