public inbox for [email protected]  
help / color / mirror / Atom feed
From: Masahiko Sawada <[email protected]>
To: [email protected]
Subject: pgsql: Refactor Copy{From|To}GetRoutine() to use pass-by-reference argu
Date: Tue, 04 Mar 2025 18:41:04 +0000
Message-ID: <[email protected]> (raw)

Refactor Copy{From|To}GetRoutine() to use pass-by-reference argument.

The change improves efficiency by eliminating unnecessary copying of
CopyFormatOptions.

The coverity also complained about inefficiencies caused by
pass-by-value.

Oversight in 7717f6300 and 2e4127b6d.

Reported-by: Junwang Zhao <[email protected]>
Reported-by: Tom Lane <[email protected]> (per reports from coverity)
Author: Sutou Kouhei <[email protected]>
Reviewed-by: Junwang Zhao <[email protected]>
Reviewed-by: Masahiko Sawada <[email protected]>
Discussion: https://postgr.es/m/CAEG8a3L6YCpPksTQMzjD_CvwDEhW3D_t=5md9BvvdOs5k+TA=Q@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/commands/copyfrom.c | 8 ++++----
src/backend/commands/copyto.c   | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)



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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Refactor Copy{From|To}GetRoutine() to use pass-by-reference argu
  In-Reply-To: <[email protected]>

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

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