Re: logicalrep_message_type throws an error

Euler Taveira <euler@eulerto.com>

From: "Euler Taveira" <euler@eulerto.com>
To: "Ashutosh Bapat" <ashutosh.bapat.oss@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, "Masahiko Sawada" <sawada.mshk@gmail.com>
Date: 2023-07-03T14:16:00Z
Lists: pgsql-hackers
On Mon, Jul 3, 2023, at 10:57 AM, Ashutosh Bapat wrote:
> On Mon, Jul 3, 2023 at 6:52 PM Ashutosh Bapat
> <ashutosh.bapat.oss@gmail.com> wrote:
> >
> > The switch is on action which is an enum. So without default it will
> > provide a compilation warning for missing enums. Adding "default" case
> > defeats that purpose. I think we should just return "???" from outside
> > switch block.
> >

Yeah. I don't think any gcc -Wswitch options have effect if a default is used
so your suggestion is good for wrong/missing message types in the future.

> PFA patch.

WFM.


--
Euler Taveira
EDB   https://www.enterprisedb.com/

Commits

  1. Fix the display of UNKNOWN message type in apply worker.