pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: test_extensible: Test module for extensible nodes and custom sca
Date: Mon, 31 Aug 2026 03:52:03 +0000
Message-ID: <E1x0t3y-00000002ptd-0vcj@gemulon.postgresql.org> (raw)
test_extensible: Test module for extensible nodes and custom scans
This commit adds a new test module that implements a CustomScan based on
an ExtensibleNode. These APIs exist in the core code for ages but had
zero coverage. This now covers the read, copy and out routines for
extensible nodes, with SQL function wrappers for each. CustomScan nodes
are tested with callbacks to manipulate the executor, based on the idea
of repeating the number of times each row is returned in a single scan,
using a GUC (default at 2 tuples for each row, can be tweaked).
The code of this module is primitive to keep its logic simpler. For
example, custom scans happen only when matching one specific, hardcoded
relation name, and work only for base relations (this can be extended at
will, as required).
This module can be used as a template for developers willing to develop
their own extensions. "Writing a Custom Scan Provider" covers the
documentation for custom scans.
Author: Aleksander Alekseev <aleksander@tigerdata.com>
Reviewed-by: Jan Nidzwetzki <jan@planetscale.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Rafia Sabih <rafia.pghackers@gmail.com>
Discussion: https://postgr.es/m/CAJ7c6TNfn9Fv_Je1etA6rrgq1onVvXbjwBTkbkd4kVQhcu11gg%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0e944fe3579ecd525e5ffe7b7db4a7e1c34de49e
Modified Files
--------------
src/test/modules/Makefile | 1 +
src/test/modules/meson.build | 1 +
src/test/modules/test_extensible/.gitignore | 4 +
src/test/modules/test_extensible/Makefile | 23 +
.../test_extensible/expected/test_extensible.out | 242 +++++++++
src/test/modules/test_extensible/meson.build | 33 ++
.../test_extensible/sql/test_extensible.sql | 83 +++
.../test_extensible/test_extensible--1.0.sql | 25 +
src/test/modules/test_extensible/test_extensible.c | 568 +++++++++++++++++++++
.../test_extensible/test_extensible.control | 4 +
src/tools/pgindent/typedefs.list | 2 +
11 files changed, 986 insertions(+)
Message-ID: <E1x0t3y-00000002ptd-0vcj@gemulon.postgresql.org>
Permalink: ../E1x0t3y-00000002ptd-0vcj@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x0t3y-00000002ptd-0vcj@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: test_extensible: Test module for extensible nodes and custom sca
In-Reply-To: <E1x0t3y-00000002ptd-0vcj@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