Re: [HACKERS] Shouldn't duplicate addition to publication be a no-op?
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] Shouldn't duplicate addition to publication be a no-op? |
| Дата | |
| Msg-id | 11698.1492086832@sss.pgh.pa.us обсуждение |
| Ответ на | [HACKERS] Shouldn't duplicate addition to publication be a no-op? (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
| Ответы |
Re: [HACKERS] Shouldn't duplicate addition to publication be a no-op?
|
| Список | pgsql-hackers |
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
> 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).
On what grounds?
The equivalent case for inheritance is an error:
regression=# create table foo (a int);
CREATE TABLE
regression=# create table bar () inherits (foo);
CREATE TABLE
regression=# alter table bar inherit foo;
ERROR: relation "foo" would be inherited from more than once
(Your example purporting to show the contrary contains a typo.)
If there's a reason why this case should act differently from that
precedent, you haven't shown it.
regards, tom lane
В списке pgsql-hackers по дате отправления: