custom-scan-api

Implement custom executor nodes and path providers in the PostgreSQL query engine.

Updated Jun 1, 2026
One-click install
npx skills add https://github.com/matejformanek/postgres-claude --skill custom-scan-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: custom-scan-api
Source: https://github.com/matejformanek/postgres-claude/tree/main/.claude/skills/custom-scan-api
Command: npx skills add https://github.com/matejformanek/postgres-claude --skill custom-scan-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the complexity of extending the PostgreSQL query engine by providing a structured interface for implementing custom physical operators, such as specialized joins, columnar scans, or hardware-accelerated processing nodes.

Core Features & Use Cases

  • Custom Path Registration: Enables the planner to consider extension-defined paths during query optimization.
  • Executor Node Implementation: Provides the framework for CustomScan and CustomScanState to execute custom logic at runtime.
  • Use Case: Developers building distributed query engines or columnar storage extensions use this to hook into the planner and executor, ensuring their custom operators are chosen and executed efficiently.

Quick Start

Use the custom-scan-api skill to guide the implementation of a new CustomPathMethods struct and its integration into the PostgreSQL planner hooks.

Frequently Asked Questions about custom-scan-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a custom scan node to the PostgreSQL query planner?

To add a custom scan node to the PostgreSQL query planner, you implement a CustomPathMethods struct and register it via planner hooks so the optimizer can consider your custom physical operator during query execution.

What is a CustomScan in PostgreSQL extension development?

A CustomScan in PostgreSQL extension development is a framework interface that allows you to define specialized executor nodes and runtime states to handle custom physical operators like columnar scans or hardware-accelerated joins.

How does PostgreSQL execute custom executor nodes during query processing?

PostgreSQL executes custom executor nodes by invoking the registered CustomExec methods at runtime, processing the CustomScanState structures to run specialized logic integrated directly within the database executor subsystem.

When do I need to implement a CustomPath for a PostgreSQL extension?

You need to implement a CustomPath for a PostgreSQL extension when building distributed query engines or columnar storage systems that require deep integration with the planner to ensure custom operators are selected efficiently.

Does the PostgreSQL custom scan API support parallel-aware execution logic?

Yes, the PostgreSQL custom scan API supports parallel-aware execution logic, allowing extensions to define CustomPath, CustomScan, and CustomExec methods that participate in parallel query execution within the database engine.

What are the limitations of using custom scan extensions in PostgreSQL?

Custom scan extensions in PostgreSQL require deep integration with the planner and executor subsystems, necessitating advanced knowledge of database internals to correctly register CustomPathMethods and manage parallel-aware execution logic without breaking query optimization.