Re: pgbench: extend variable usage in scripts

From: lakshmi <lakshmigcdac(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench: extend variable usage in scripts
Date: 2026-01-09 11:43:34
Message-ID: CAEvyyTjCDun7xt-TdKKBULzcsk3QJcMfxPcZ1dka6p9dHxGC8A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While testing
patch (0001-pgbench-Allow-variables-to-be-used-as-an-SQL-literal.patch), I
reproduced the CI failure reported by Michael (-Werror=switch for
PQUOTE_SHELL_ARG in replaceVariable()).

Attached is a small follow-up patch that handles
-The missing enum case,
-Removes an unused variable
-Ensures quoted_value is always initialized.
This builds cleanly for me.

Regards,
Lakshmi

On Fri, Jan 9, 2026 at 2:41 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> On Thu, Sep 18, 2025 at 03:33:30PM +0900, Yugo Nagata wrote:
> > Any thought?
>
> Note that the CI is complaining a bit. Relevant extract:
> [22:51:36.908] pgbench.c: In function ‘replaceVariable’:
> [22:51:36.908] pgbench.c:1990:9: error: enumeration value
> ‘PQUOTE_SHELL_ARG’ not handled in switch [-Werror=switch]
> [22:51:36.908] 1990 | switch (quote)
> --
> Michael
>

Attachment Content-Type Size
pgbench-ci-fix.patch text/x-patch 911 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2026-01-09 11:56:13 Re: Pasword expiration warning
Previous Message Hayato Kuroda (Fujitsu) 2026-01-09 11:28:35 RE: [Patch] add new parameter to pg_replication_origin_session_setup