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

2017-04-17 Thread Amit Langote
On 2017/04/17 14:46, Robert Haas wrote: > On Sun, Apr 16, 2017 at 11:58 PM, Amit Langote > 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

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

2017-04-16 Thread Robert Haas
On Sun, Apr 16, 2017 at 11:58 PM, Amit Langote 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"

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

2017-04-16 Thread Amit Langote
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

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

2017-04-14 Thread Peter Eisentraut
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

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

2017-04-13 Thread Amit Langote
On Thu, Apr 13, 2017 at 9:33 PM, Tom Lane wrote: > Amit Langote 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

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

2017-04-13 Thread Tom Lane
Amit Langote 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

[HACKERS] Shouldn't duplicate addition to publication be a no-op?

2017-04-13 Thread Amit Langote
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