Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION

From: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION
Date: 2022-10-17 03:09:29
Message-ID: OS0PR01MB57160AD0E7386547BA978EB394299@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
0001-Improve-errhint-for-ALTER-SUBSCRIPTION-ADD-DROP-PUBL.patch application/octet-stream 1.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-10-17 03:17:43 Re: Schema variables - new implementation for Postgres 15
Previous Message osumi.takamichi@fujitsu.com 2022-10-17 03:02:05 RE: [Proposal] Add foreign-server health checks infrastructure