Re: Shouldn't duplicate addition to publication be a no-op?

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Shouldn't duplicate addition to publication be a no-op?
Date: 2017-04-17 03:58:12
Message-ID: 65e0e78f-5b0c-8cd6-c5eb-326a9e36a302@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017/04/15 8:53, Peter Eisentraut wrote:
> On 4/13/17 06:23, Amit Langote wrote:
>> 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.
>
> We generally require a IF NOT EXISTS in those situations.

Hmm, okay. So I guess the grammar support will be added later.

By the way, Petr said in the other thread that it could be made a no-op
(presumably without requiring IF NOT EXISTS) on the grounds that
membership of table in publication is "soft object" or "property" rather
than real object.

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2017-04-17 04:05:10 Re: Variable substitution in psql backtick expansion
Previous Message Amit Langote 2017-04-17 03:00:50 Re: Logical replication and inheritance