Re: Added schema level support for publication. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Added schema level support for publication.
Date
Msg-id 555773.1631592169@sss.pgh.pa.us
Whole thread Raw
In response to Re: Added schema level support for publication.  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes:
> On Mon, Sep 13, 2021 at 7:06 PM tanghy.fnst@fujitsu.com
> <tanghy.fnst@fujitsu.com> wrote:
>> I think if I use 'ALTER PUBLICATION ... SET', both the list of tables and the
>> list of all tables in schemas should be reset. The publication should only
>> contain the tables and all tables in schemas which user specified. If user only
>> specified all tables in schema, and didn't specify tables, the tables which used
>> to be part of the publication should be dropped, too. But currently, if I didn't
>> specify tables, the list of tables wouldn't be set to empty. Thoughts?

> I think we can go either way here but it seems like we should drop the
> tables in the case you mentioned. The idea is that the SET variant in
> ALTER PUBLICATION should replace the set of tables and schemas for the
> publication which seems to be in line with the current behavior where
> we replace the set of tables.

Yeah, I think it's sensible to define that there is just one SET variant
that replaces both the list-of-tables and the list-of-schemas.  (Of
course, the syntax for it has to permit both lists to be written.)
You could imagine having two independent SET commands for the two lists,
but that seems fairly confusing.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: Don't clean up LLVM state when exiting in a bad way
Next
From: Amit Kapila
Date:
Subject: Re: Added schema level support for publication.