From: Jonathan S. Katz <jkatz@postgresql.org>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Robert Haas <robertmhaas@gmail.com>
Cc: houzj.fnst@fujitsu.com <houzj.fnst@fujitsu.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Subject: Re: why can't a table be part of the same publication as its schema
Date: Wed, 21 Sep 2022 10:54:39 -0400
Message-ID: <6d878c98-6094-11b2-9161-5523b95eb38d@postgresql.org> (raw)
In-Reply-To: <20220921142422.3geaqus4ebuwtew2@alvherre.pgsql>
References: <20220921142422.3geaqus4ebuwtew2@alvherre.pgsql>
On 9/21/22 10:24 AM, Alvaro Herrera wrote:
> On 2022-Sep-20, Robert Haas wrote:
>
>>> I don't think we should change this behavior that's already in logical
>>> replication. While I understand the reasons why "GRANT ... ALL TABLES IN
>>> SCHEMA" has a different behavior (i.e. it's not applied to future
>>> objects) and do not advocate to change it, I have personally been
>>> affected where I thought a permission would be applied to all future
>>> objects, only to discover otherwise. I believe it's more intuitive to
>>> think that "ALL" applies to "everything, always."
>>
>> Nah, there's room for multiple behaviors here. It's reasonable to want
>> to add all the tables currently in the schema to a publication (or
>> grant permissions on them) and it's reasonable to want to include all
>> current and future tables in the schema in a publication (or grant
>> permissions on them) too. The reason I don't like the ALL TABLES IN
>> SCHEMA syntax is that it sounds like the former, but actually is the
>> latter. Based on your link to the email from Tom, I understand now the
>> reason why it's like that, but it's still counterintuitive to me.
>
> I already proposed elsewhere that we remove the ALL keyword from there,
> which I think serves to reduce confusion (in particular it's no longer
> parallel to the GRANT one). As in the attached.
[personal, not RMT hat]
I'd be OK with this. It would still allow for "FOR SEQUENCES IN SCHEMA" etc.
Jonathan
Attachments:
OpenPGP_signature (application/pgp-signature, 839B) download
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: jkatz@postgresql.org, alvherre@alvh.no-ip.org, robertmhaas@gmail.com, houzj.fnst@fujitsu.com, amit.kapila16@gmail.com, vignesh21@gmail.com, tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com
Subject: Re: why can't a table be part of the same publication as its schema
In-Reply-To: <6d878c98-6094-11b2-9161-5523b95eb38d@postgresql.org>
* 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