Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Japin Li <japinli(at)hotmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax
Date: 2021-04-03 05:20:46
Message-ID: CALj2ACVywM8SVydZ2uStTad=qa6WW=Qe=TqbpApP95ppiVGN2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 3, 2021 at 1:29 AM Peter Eisentraut
<peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:
> The code you have in merge_publications() to report all existing
> publications is pretty messy and is not properly internationalized. I
> think what you are trying to do there is excessive. Compare this
> similar case:
>
> create table t1 (a int, b int);
> alter table t1 add column a int, add column b int;
> ERROR: 42701: column "a" of relation "t1" already exists
>
> I think you can make both this and the duplicate checking much simpler
> if you just report the first conflict.

Yes, we are erroring out on the first conflict for both duplicates and
in merge_publications.

> I think this patch is about ready to commit, but please provide a final
> version in good time.

I took the liberty to address all the review comments and provide a v9
patch on top of Japin's v8 patch-set.

> (Also, please combine your patches into a single patch.)

Done.

Attaching v9 patch, please review it.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v9-0001-Introduce-a-new-syntax-to-add-drop-publications.patch application/octet-stream 18.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2021-04-03 06:50:54 Re: [PATCH] Implement motd for PostgreSQL
Previous Message Joel Jacobson 2021-04-03 05:20:23 Re: [PATCH] Implement motd for PostgreSQL