RE: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-18 Thread houzj.f...@fujitsu.com
On Tuesday, October 18, 2022 5:50 PM Alvaro Herrera wrote: > > On 2022-Oct-18, Japin Li wrote: > > > > > On Tue, 18 Oct 2022 at 12:00, houzj.f...@fujitsu.com > wrote: > > > > > Agreed. Here is new version patch which changed the error code and > > > moved the whole command out of the message

Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-18 Thread Alvaro Herrera
On 2022-Oct-18, Japin Li wrote: > > On Tue, 18 Oct 2022 at 12:00, houzj.f...@fujitsu.com > wrote: > > > Agreed. Here is new version patch which changed the error code and > > moved the whole command out of the message according to Álvaro's comment. > > My bad! The patch looks good to me.

Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-17 Thread Japin Li
On Tue, 18 Oct 2022 at 12:00, houzj.f...@fujitsu.com wrote: > Agreed. Here is new version patch which changed the error code and > moved the whole command out of the message according to Álvaro's comment. > My bad! The patch looks good to me. -- Regrads, Japin Li. ChengDu WenWu

RE: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-17 Thread houzj.f...@fujitsu.com
On Monday, October 17, 2022 6:14 PM Amit Kapila wrote: > > On Mon, Oct 17, 2022 at 2:41 PM Alvaro Herrera > wrote: > > > > On 2022-Oct-17, Peter Smith wrote: > > > > > On Mon, Oct 17, 2022 at 6:43 PM Alvaro Herrera > wrote: > > > > > > I'm not sure that ERRCODE_SYNTAX_ERROR is the right thing

Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-17 Thread Amit Kapila
On Mon, Oct 17, 2022 at 2:41 PM Alvaro Herrera wrote: > > On 2022-Oct-17, Peter Smith wrote: > > > On Mon, Oct 17, 2022 at 6:43 PM Alvaro Herrera > > wrote: > > > > I'm not sure that ERRCODE_SYNTAX_ERROR is the right thing here; sounds > > > like ERRCODE_FEATURE_NOT_SUPPORTED might be more

Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-17 Thread Alvaro Herrera
On 2022-Oct-17, Peter Smith wrote: > On Mon, Oct 17, 2022 at 6:43 PM Alvaro Herrera > wrote: > > I'm not sure that ERRCODE_SYNTAX_ERROR is the right thing here; sounds > > like ERRCODE_FEATURE_NOT_SUPPORTED might be more appropriate. > > I thought maybe

Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-17 Thread Peter Smith
On Mon, Oct 17, 2022 at 6:43 PM Alvaro Herrera wrote: > > Hello > > On 2022-Oct-17, houzj.f...@fujitsu.com wrote: > > > alter subscription sub add publication pub2; > > > Because I was executing the ADD PUBLICATION command, I feel the hint should > > also mention it instead of SET PUBLICATION. >

Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-17 Thread Alvaro Herrera
Hello On 2022-Oct-17, houzj.f...@fujitsu.com wrote: > alter subscription sub add publication pub2; > Because I was executing the ADD PUBLICATION command, I feel the hint should > also mention it instead of SET PUBLICATION. Hmm, ok. But: > @@ -1236,8 +1237,9 @@ AlterSubscription(ParseState

Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-16 Thread Amit Kapila
On Mon, Oct 17, 2022 at 8:39 AM houzj.f...@fujitsu.com wrote: > > While working on some logical replication related features. > I found the HINT message could be improved when I tried to add a publication > to > a subscription which was disabled. > > alter subscription sub add publication pub2;

Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2022-10-16 Thread houzj.f...@fujitsu.com
Hi, While working on some logical replication related features. I found the HINT message could be improved when I tried to add a publication to a subscription which was disabled. alter subscription sub add publication pub2; -- ERROR: ALTER SUBSCRIPTION with refresh is not allowed for disabled