Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION - Mailing list pgsql-hackers

From houzj.fnst@fujitsu.com
Subject Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION
Date
Msg-id OS0PR01MB57160AD0E7386547BA978EB394299@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
Responses Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION  (Amit Kapila <amit.kapila16@gmail.com>)
Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
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 subscriptions
HINT: Use ALTER SUBSCRIPTION ... SET PUBLICATION ... WITH (refresh = false).
--

Because I was executing the ADD PUBLICATION command, I feel the hint should
also mention it instead of SET PUBLICATION.

Best regards,
Hou zj



Attachment

pgsql-hackers by date:

Previous
From: "osumi.takamichi@fujitsu.com"
Date:
Subject: RE: [Proposal] Add foreign-server health checks infrastructure
Next
From: Julien Rouhaud
Date:
Subject: Re: Schema variables - new implementation for Postgres 15