Re: Fix out-of-bounds in the function GetCommandTagName

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ranier Vilela <ranier.vf@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2024-04-15T01:09:02Z
Lists: pgsql-hackers
On Mon, 15 Apr 2024 at 11:54, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> would this also allow us to get rid of any default:
> cases in switches on command tags?

git grep "case CMDTAG_" does not yield any results.

As far as I understand, we'd only be able to get rid of a default case
if we had a switch that included all CMDTAG* values apart from
COMMAND_TAG_NEXTTAG.  If we don't ever switch on CMDTAG values then I
think the answer to your question is "no".

David



Commits

  1. Remove COMMAND_TAG_NEXTTAG from enum CommandTag.