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

From houzj.fnst@fujitsu.com
Subject RE: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION
Date
Msg-id OS0PR01MB5716F1E8D21890B12F6133A394289@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION
List pgsql-hackers
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


Attachment

pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: [PATCH] Allow usage of archive .backup files as backup_label
Next
From: Michael Paquier
Date:
Subject: Re: pg_upgrade test failure