[PATCH] Add tests for src/backend/nodes/extensible.c
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t139183psql -h localhost -U postgresBuilt from patchset v5 (message #5), August 17, 2026 at 10:01 AM.
Hi,
Currently extensible.c is not covered by any tests. The proposed patch
fixes this. Also it can serve as an example of using CustomScan and
ExtensibleNode.
For the reviewers
-----------------------
Here is how to check the code coverage:
```
git clean -df
rm -r build
meson setup --buildtype debug -Db_coverage=true -Dcassert=true
-Dinjection_points=true -Dtap_tests=enabled -Dldap=disabled
-Dicu=disabled -DPG_TEST_EXTRA="kerberos ldap libpq_encryption
load_balance oauth regress_dump_restore ssl wal_consistency_checking
xid_wraparound" -Dprefix=/home/eax/pginstall build
ninja -C build
meson test -C build
ninja -C build coverage-html
open build/meson-logs/coveragereport/index.html
```
You are going to need `lcov` 1.16 in your $PATH because there are
certain problems with newer versions [1]/messages/by-id/CAJ7c6TN+MCh99EZ8YGhXZAdnqvNQYir6E34B_mmcB5KsxCB00A@mail.gmail.com.
[1]: /messages/by-id/CAJ7c6TN+MCh99EZ8YGhXZAdnqvNQYir6E34B_mmcB5KsxCB00A@mail.gmail.com
--
Best regards,
Aleksander Alekseev
Attachments:
v1-0001-Add-test-module-for-src-backend-nodes-extensible.patchtext/x-patch; charset=UTF-8; name=v1-0001-Add-test-module-for-src-backend-nodes-extensible.patchDownload+575-1
On Tue, 31 Mar 2026 at 20:48, Aleksander Alekseev <aleksander@tigerdata.com>
wrote:
Hi,
Currently extensible.c is not covered by any tests. The proposed patch
fixes this. Also it can serve as an example of using CustomScan and
ExtensibleNode.For the reviewers
-----------------------Here is how to check the code coverage:
```
git clean -df
rm -r build
meson setup --buildtype debug -Db_coverage=true -Dcassert=true
-Dinjection_points=true -Dtap_tests=enabled -Dldap=disabled
-Dicu=disabled -DPG_TEST_EXTRA="kerberos ldap libpq_encryption
load_balance oauth regress_dump_restore ssl wal_consistency_checking
xid_wraparound" -Dprefix=/home/eax/pginstall build
ninja -C build
meson test -C build
ninja -C build coverage-html
open build/meson-logs/coveragereport/index.html
```You are going to need `lcov` 1.16 in your $PATH because there are
certain problems with newer versions [1].[1]:
/messages/by-id/CAJ7c6TN+MCh99EZ8YGhXZAdnqvNQYir6E34B_mmcB5KsxCB00A@mail.gmail.com--
Best regards,
Aleksander Alekseev
I looked into this patch and have a few comments.
Firstly, in test_create_custom_scan_state() why hard coding css.slotOps =
&TTSOpsBufferHeapTuple and not using the table_slot_callbacks() for the
purpose and getting the real AM.
Next, in test_plan_custom_path, the last two arguments are never used.
There are no tests for nodeCopy, nodeEqual, nodeOut, and nodeRead routines.
--
Regards,
Rafia Sabih
CYBERTEC PostgreSQL International GmbH
Hi Rafia,
I looked into this patch and have a few comments.
Firstly, in test_create_custom_scan_state() why hard coding css.slotOps = &TTSOpsBufferHeapTuple and not using the table_slot_callbacks() for the purpose and getting the real AM.
Next, in test_plan_custom_path, the last two arguments are never used.
There are no tests for nodeCopy, nodeEqual, nodeOut, and nodeRead routines.
Many thanks for the feedback! Here is the corrected patch.
--
Best regards,
Aleksander Alekseev
Attachments:
v2-0001-Add-test-module-for-src-backend-nodes-extensible..patchtext/x-patch; charset=US-ASCII; name=v2-0001-Add-test-module-for-src-backend-nodes-extensible..patchDownload+762-1
On Thu, 30 Jul 2026 at 18:21, Aleksander Alekseev <aleksander@tigerdata.com>
wrote:
Hi Rafia,
I looked into this patch and have a few comments.
Firstly, in test_create_custom_scan_state() why hard coding css.slotOps= &TTSOpsBufferHeapTuple and not using the table_slot_callbacks() for the
purpose and getting the real AM.Next, in test_plan_custom_path, the last two arguments are never used.
There are no tests for nodeCopy, nodeEqual, nodeOut, and nodeReadroutines.
Many thanks for the feedback! Here is the corrected patch.
Thanks. There is a typo in the current patch --... the CustomScanStateand
and is expected
Other than that it looks good to me.
--
Regards,
Rafia Sabih
CYBERTEC PostgreSQL International GmbH
Hi Rafia,
Thanks. There is a typo in the current patch --... the CustomScanStateand and is expected
Other than that it looks good to me.
Thanks! Fixed.
--
Best regards,
Aleksander Alekseev