pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Consolidate the function pointer types used by dshash.c.
Date: Fri, 25 Aug 2017 00:52:52 +0000
Message-ID: <E1dl2rk-0001VH-44@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Consolidate the function pointer types used by dshash.c.

Commit 8c0d7bafad36434cb08ac2c78e69ae72c194ca20 introduced dshash with hash
and compare functions like DynaHash's, and also variants that take a user
data pointer instead of size.  Simplify the interface by merging them into
a single pair of function pointer types that take both size and a user data
pointer.

Since it is anticipated that memcmp and tag_hash behavior will be a common
requirement, provide wrapper functions dshash_memcmp and dshash_memhash that
conform to the new function types.

Author: Thomas Munro
Reviewed-By: Andres Freund
Discussion: https://postgr.es/m/20170823054644.efuzftxjpfi6wwqs%40alap3.anarazel.de

Branch
------
master

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

Modified Files
--------------
src/backend/lib/dshash.c | 65 +++++++++++++++++++++---------------------------
src/include/lib/dshash.h | 37 ++++++++-------------------
2 files changed, 39 insertions(+), 63 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1dl2rk-0001VH-44@gemulon.postgresql.org>
Permalink:  ../E1dl2rk-0001VH-44@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dl2rk-0001VH-44@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: Consolidate the function pointer types used by dshash.c.
  In-Reply-To: <E1dl2rk-0001VH-44@gemulon.postgresql.org>
  References: <E1dl2rk-0001VH-44@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