Re: why can't a table be part of the same publication as its schema - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: why can't a table be part of the same publication as its schema
Date
Msg-id 20220921142422.3geaqus4ebuwtew2@alvherre.pgsql
Whole thread Raw
In response to Re: why can't a table be part of the same publication as its schema  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: why can't a table be part of the same publication as its schema
Re: why can't a table be part of the same publication as its schema
List pgsql-hackers
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.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"No renuncies a nada. No te aferres a nada."

Attachment

pgsql-hackers by date:

Previous
From: Melih Mutlu
Date:
Subject: Removing unused parameter in SnapBuildGetOrBuildSnapshot
Next
From: Junwang Zhao
Date:
Subject: Re: [PATCH] polish the error message of creating proc