Re: logicalrep_message_type throws an error - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: logicalrep_message_type throws an error
Date
Msg-id CAExHW5vvhhtdv-LctC5Wz-yuyh1me3KtvyuOqX48BRQicDGTJg@mail.gmail.com
Whole thread Raw
In response to Re: logicalrep_message_type throws an error  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: logicalrep_message_type throws an error
List pgsql-hackers
On Sat, Jul 15, 2023 at 12:57 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > Since the numerical value is important only in invalid message type
> > cases, how about using a format like "??? (88)" in unknown message
> > type cases, in both error and context messages?
> >
>
> Do you have something like attached in mind?

Prologue of psprintf() says

* Errors are not returned to the caller, but are reported via elog(ERROR)
* in the backend, or printf-to-stderr-and-exit() in frontend builds.
* One should therefore think twice about using this in libpq.

If an error occurs in psprintf(), it will throw an error which will
override the original error. I think we should avoid any stuff that
throws further errors.

--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Seraphime Kirkovski
Date:
Subject: Fine-tune TLS 1.3 cipher suites and curves lists
Next
From: Aleksander Alekseev
Date:
Subject: Re: Getting rid of OverrideSearhPath in namespace.c