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

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Shouldn't duplicate addition to publication be a no-op?
Date: 2017-04-14 23:53:25
Message-ID: c871da7b-a727-8d20-f966-f61e2ccf0d3d@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-04-14 23:57:30 Re: Allowing extended stats on foreign and partitioned tables
Previous Message Rod Taylor 2017-04-14 23:51:34 Re: Row Level Security UPDATE Confusion