pgbench: remove an unused function argument

Started by Yugo Nagata4 months ago4 messages
#1Yugo Nagata
nagata@sraoss.co.jp
1 attachment(s)

Hi,

I've attached a patch that removes an unused argument from
create_sql_command() in pgbench.c.

This originates from commit 68ab8e8ba4a4, which split process_commands()
into process_sql_command() (the predecessor of create_sql_command())
and process_backslash_command().

Regards,
Yugo Nagata

--
Yugo Nagata <nagata@sraoss.co.jp>

Attachments:

pgbench_remove_unused_arg.patchtext/x-diff; name=pgbench_remove_unused_arg.patchDownload
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 125f3c7bbbe..3cafd88ac53 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -5599,7 +5599,7 @@ skip_sql_comments(char *sql_command)
  * struct.
  */
 static Command *
-create_sql_command(PQExpBuffer buf, const char *source)
+create_sql_command(PQExpBuffer buf)
 {
 	Command    *my_command;
 	char	   *p = skip_sql_comments(buf->data);
@@ -5992,7 +5992,7 @@ ParseScript(const char *script, const char *desc, int weight)
 		sr = psql_scan(sstate, &line_buf, &prompt);
 
 		/* If we collected a new SQL command, process that */
-		command = create_sql_command(&line_buf, desc);
+		command = create_sql_command(&line_buf);
 
 		/* store new command */
 		if (command)
#2Steven Niu
niushiji@gmail.com
In reply to: Yugo Nagata (#1)
Re: pgbench: remove an unused function argument

Looks good to me.

Best Regards,
Steven
________________________________
From: Yugo Nagata <nagata@sraoss.co.jp>
Sent: Wednesday, September 17, 2025 10:28
To: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: pgbench: remove an unused function argument

Hi,

I've attached a patch that removes an unused argument from
create_sql_command() in pgbench.c.

This originates from commit 68ab8e8ba4a4, which split process_commands()
into process_sql_command() (the predecessor of create_sql_command())
and process_backslash_command().

Regards,
Yugo Nagata

--
Yugo Nagata <nagata@sraoss.co.jp>

#3Fujii Masao
masao.fujii@gmail.com
In reply to: Steven Niu (#2)
Re: pgbench: remove an unused function argument

On Wed, Sep 17, 2025 at 5:25 PM Steven Niu <niushiji@gmail.com> wrote:

I've attached a patch that removes an unused argument from
create_sql_command() in pgbench.c.

LGTM. Barring any objection, I will commit the patch.

Regards,

--
Fujii Masao

#4Fujii Masao
masao.fujii@gmail.com
In reply to: Fujii Masao (#3)
Re: pgbench: remove an unused function argument

On Wed, Sep 17, 2025 at 10:31 PM Fujii Masao <masao.fujii@gmail.com> wrote:

On Wed, Sep 17, 2025 at 5:25 PM Steven Niu <niushiji@gmail.com> wrote:

I've attached a patch that removes an unused argument from
create_sql_command() in pgbench.c.

LGTM. Barring any objection, I will commit the patch.

I've pushed the patch. Thanks!

Regards,

--
Fujii Masao