From: | "Tristan Partin" <tristan(at)neon(dot)tech> |
---|---|
To: | "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl> |
Cc: | "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Heikki Linnakangas" <hlinnaka(at)iki(dot)fi>, <pgsql-hackers(at)postgresql(dot)org>, "Shlok Kyal" <shlok(dot)kyal(dot)oss(at)gmail(dot)com> |
Subject: | Re: psql not responding to SIGINT upon db reconnection |
Date: | 2024-04-03 15:16:58 |
Message-ID: | D0AL5FP6NY56.3XTMVQM9UC6P@neon.tech |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed Apr 3, 2024 at 10:05 AM CDT, Jelte Fennema-Nio wrote:
> On Wed, 3 Apr 2024 at 16:55, Tristan Partin <tristan(at)neon(dot)tech> wrote:
> > Removing from the switch statement causes a warning:
> >
> > > [1/2] Compiling C object src/bin/psql/psql.p/command.c.o
> > > ../src/bin/psql/command.c: In function ‘wait_until_connected’:
> > > ../src/bin/psql/command.c:3803:17: warning: enumeration value ‘PGRES_POLLING_ACTIVE’ not handled in switch [-Wswitch]
> > > 3803 | switch (PQconnectPoll(conn))
> > > | ^~~~~~
>
>
> Ofcourse... fixed now
I think patch 2 makes it worse. The value in -Wswitch is that when new
enum variants are added, the developer knows the locations to update.
Adding a default case makes -Wswitch pointless.
Patch 1 is still good. The comment change in patch 2 is good too!
--
Tristan Partin
Neon (https://neon.tech)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-04-03 15:29:35 | Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~? |
Previous Message | Jelte Fennema-Nio | 2024-04-03 15:05:44 | Re: psql not responding to SIGINT upon db reconnection |