pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make binaryheap available to frontend code.
Date: Mon, 18 Sep 2023 19:19:05 +0000
Message-ID: <E1qiJlx-004c7P-Ha@gemulon.postgresql.org> (raw)

Make binaryheap available to frontend code.

There are a couple of places in frontend code that could make use
of this simple binary heap implementation.  This commit makes
binaryheap usable in frontend code, much like commit 26aaf97b68 did
for StringInfo.  Like StringInfo, the header file is left in lib/
to reduce the likelihood of unnecessary breakage.

The frontend version of binaryheap exposes a void *-based API since
frontend code does not have access to the Datum definitions.  This
seemed like a better approach than switching all existing uses to
void * or making the Datum definitions available to frontend code.

Reviewed-by: Tom Lane, Alvaro Herrera
Discussion: https://postgr.es/m/3612876.1689443232%40sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5af0263afd7beaf947e22115b7e9ade000b0387d

Modified Files
--------------
src/backend/lib/Makefile                 |  1 -
src/backend/lib/meson.build              |  1 -
src/common/Makefile                      |  1 +
src/{backend/lib => common}/binaryheap.c | 41 +++++++++++++++++++++++---------
src/common/meson.build                   |  1 +
src/include/lib/binaryheap.h             | 26 ++++++++++++++------
src/tools/pgindent/typedefs.list         |  1 +
7 files changed, 52 insertions(+), 20 deletions(-)



Message-ID: <E1qiJlx-004c7P-Ha@gemulon.postgresql.org>
Permalink:  ../E1qiJlx-004c7P-Ha@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qiJlx-004c7P-Ha@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: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Make binaryheap available to frontend code.
  In-Reply-To: <E1qiJlx-004c7P-Ha@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