From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | 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 06:00:31 |
Message-ID: | d505e15c-8573-f856-7c91-35c4674ae91c@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2017/04/17 14:46, Robert Haas wrote:
> On Sun, Apr 16, 2017 at 11:58 PM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> 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.
>
> I don't find that argument terribly convincing.
>
> The nearest parallel that we have for this is probably:
>
> ALTER EXTENSION name ADD member_object;
> ALTER EXTENSION name DROP member_object;
>
> I would guess this ought to work similarly.
Hmm, it does make sense to mock this behavior.
create extension dummy;
create table foo ();
alter extension dummy add table foo;
alter extension dummy add table foo;
ERROR: table foo is already a member of extension "dummy"
Thanks,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2017-04-17 06:09:23 | Re: Variable substitution in psql backtick expansion |
Previous Message | Kyotaro HORIGUCHI | 2017-04-17 05:54:52 | Re: Should pg_current_wal_location() become pg_current_wal_lsn() |