RE: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
To: Amit Kapila <amit.kapila16@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Peter Smith <smithpb2250@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2022-10-18T04:00:20Z
Lists: pgsql-hackers
Attachments
- v2-0001-Improve-errhint-for-ALTER-SUBSCRIPTION-ADD-DROP-PUBL.patch (application/octet-stream) patch v2-0001
On Monday, October 17, 2022 6:14 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Mon, Oct 17, 2022 at 2:41 PM Alvaro Herrera <alvherre@alvh.no-ip.org> > wrote: > > > > On 2022-Oct-17, Peter Smith wrote: > > > > > On Mon, Oct 17, 2022 at 6:43 PM Alvaro Herrera > <alvherre@alvh.no-ip.org> 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 ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE, which > > > would make it the same as similar messages in the same function when > > > incompatible parameters are specified. > > > > Hmm, yeah, I guess that's also a possibility. > > > > Right, ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE seems to suite better > here. 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. Best regards, Hou zj
Commits
-
Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION
- 915a6c4e22ec 16.0 landed
- 25fb9579bbb9 15.1 landed