pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix latent bug in get_stats_option_name()
Date: Mon, 30 Mar 2026 17:50:26 +0000
Message-ID: <E1w7Gkr-002BNh-1F@gemulon.postgresql.org> (raw)

Fix latent bug in get_stats_option_name()

The function is supposed to look at the passed in 'arg' argument, but
peeks at the 'optarg' global variable that's part of getopt()
instead. It happened to work anyway, because all callers passed
'optarg' as the argument.

Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/d1da5f0e-0d68-47c9-a882-eb22f462752f@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c5f7820e5780f5be9cb406834108576b42e568f8

Modified Files
--------------
src/backend/tcop/postgres.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



Message-ID: <E1w7Gkr-002BNh-1F@gemulon.postgresql.org>
Permalink:  ../E1w7Gkr-002BNh-1F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w7Gkr-002BNh-1F@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix latent bug in get_stats_option_name()
  In-Reply-To: <E1w7Gkr-002BNh-1F@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox