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

From Euler Taveira
Subject Re: logicalrep_message_type throws an error
Date
Msg-id 96d1e30b-2373-4694-95d8-91c93e4a6ece@app.fastmail.com
Whole thread Raw
In response to Re: logicalrep_message_type throws an error  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List 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
>
> 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

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Make uselocale protection more consistent
Next
From: Daniel Gustafsson
Date:
Subject: Re: pg_basebackup check vs Windows file path limits