Re: allow frontend use of the backend's core hashing functions

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: David Fetter <david@fetter.org>
Cc: Mark Dilger <mark.dilger@enterprisedb.com>, Suraj Kharage <suraj.kharage@enterprisedb.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-02-14T16:21:37Z
Lists: pgsql-hackers
On Fri, Feb 14, 2020 at 11:15 AM David Fetter <david@fetter.org> wrote:
> One question. It might be possible to make these functions faster
> using compiler intrinsics. Would those still be available to front-end
> code?

Why not? We use the same compiler for frontend code as we do for
backend code. Possibly you might need some more header-file
rejiggering someplace, but I don't know of anything specific or see
any reason why it would be particularly painful if we had to do
something.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Commits

  1. Move src/backend/utils/hash/hashfn.c to src/common

  2. Adapt hashfn.c and hashutils.h for frontend use.

  3. Put all the prototypes for hashfn.c into the same header file.

  4. Move bitmap_hash and bitmap_match to bitmapset.c.