I wonder if trying to add a relation to a publication that it is already a
part should be considered a no-op, instead of causing an error (which
happens in the ALTER PUBLICATION ADD TABLES case).
create table bar (a int);
create publication mypub for table bar;
alter publication mypub add table bar;
ERROR: relation "bar" is already member of publication "mypub"
2nd command should be a no-op, IMHO.
Consider the following (I know we're discussing inheritance elsewhere as
well):
create table foo (a int);
create table baz () inherits (foo);
alter table bar inherit foo;
alter table mypub add table foo;
ERROR: relation "bar" is already member of publication "mypub"
There is no way to add foo and children other than bar to mypub without
doing so one-by-one.
If my proposal to make that a no-op sounds desirable, attached patch
implements that.
Thanks,
Amit
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers