Re: logicalrep_message_type throws an error

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: "Ashutosh Bapat" <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, "Masahiko Sawada" <sawada(dot)mshk(at)gmail(dot)com>
Subject: Re: logicalrep_message_type throws an error
Date: 2023-07-03 14:16:00
Message-ID: 96d1e30b-2373-4694-95d8-91c93e4a6ece@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(dot)bapat(dot)oss(at)gmail(dot)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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-07-03 14:16:02 Re: pg_basebackup check vs Windows file path limits
Previous Message Peter Eisentraut 2023-07-03 14:15:18 Re: Make uselocale protection more consistent