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

From Alvaro Herrera
Subject Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION
Date
Msg-id 20221017091052.ebaluewuvisquqwl@alvherre.pgsql
Whole thread Raw
In response to Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
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.

Maybe we need a specific errcode, "incompatible logical replication
configuration", within that class ("object not in prerequisite state" is
a generic SQLSTATE class 55), given that the class itself is a mishmash
of completely unrelated things.  I think I already mentioned this in
some other thread ... ah yes:

https://postgr.es/m/20220928084641.xecjrgym476fihtn@alvherre.pgsql
"incompatible publication definition" 55PR1 is what I suggested then.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Hay dos momentos en la vida de un hombre en los que no debería
especular: cuando puede permitírselo y cuando no puede" (Mark Twain)



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION
Next
From: Amit Langote
Date:
Subject: Re: generic plans and "initial" pruning