pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Replace gratuitous memmove() with memcpy()
Date: Wed, 11 Sep 2024 13:38:01 +0000
Message-ID: <E1soNXl-000ah0-0f@gemulon.postgresql.org> (raw)

Replace gratuitous memmove() with memcpy()

The index access methods all had similar code that copied the
passed-in scan keys to local storage.  They all used memmove() for
that, which is not wrong, but it seems confusing not to use memcpy()
when that would work.  Presumably, this was all once copied from
ancient code and never adjusted.

Discussion: https://www.postgresql.org/message-id/flat/f8c739d9-f48d-4187-b214-df3391ba41ab@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8b5c6a54c4396bb9daeb9ec5d9cbb0d3deedcbe3

Modified Files
--------------
contrib/bloom/blscan.c              | 5 +----
src/backend/access/brin/brin.c      | 3 +--
src/backend/access/gin/ginscan.c    | 5 +----
src/backend/access/gist/gistscan.c  | 6 ++----
src/backend/access/hash/hash.c      | 6 +-----
src/backend/access/nbtree/nbtree.c  | 4 +---
src/backend/access/spgist/spgscan.c | 6 ++----
7 files changed, 9 insertions(+), 26 deletions(-)



Message-ID: <E1soNXl-000ah0-0f@gemulon.postgresql.org>
Permalink:  ../E1soNXl-000ah0-0f@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1soNXl-000ah0-0f@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Replace gratuitous memmove() with memcpy()
  In-Reply-To: <E1soNXl-000ah0-0f@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