blob: f29b9ae3e914242b67d5b0dca95283382e18c7d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 61. Writing a Custom Scan Provider</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="tablesample-support-functions.html" title="60.1. Sampling Method Support Functions" /><link rel="next" href="custom-scan-path.html" title="61.1. Creating Custom Scan Paths" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Chapter 61. Writing a Custom Scan Provider</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="tablesample-support-functions.html" title="60.1. Sampling Method Support Functions">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="internals.html" title="Part VII. Internals">Up</a></td><th width="60%" align="center">Part VII. Internals</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.2 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="custom-scan-path.html" title="61.1. Creating Custom Scan Paths">Next</a></td></tr></table><hr /></div><div class="chapter" id="CUSTOM-SCAN"><div class="titlepage"><div><div><h2 class="title">Chapter 61. Writing a Custom Scan Provider</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="custom-scan-path.html">61.1. Creating Custom Scan Paths</a></span></dt><dd><dl><dt><span class="sect2"><a href="custom-scan-path.html#CUSTOM-SCAN-PATH-CALLBACKS">61.1.1. Custom Scan Path Callbacks</a></span></dt></dl></dd><dt><span class="sect1"><a href="custom-scan-plan.html">61.2. Creating Custom Scan Plans</a></span></dt><dd><dl><dt><span class="sect2"><a href="custom-scan-plan.html#CUSTOM-SCAN-PLAN-CALLBACKS">61.2.1. Custom Scan Plan Callbacks</a></span></dt></dl></dd><dt><span class="sect1"><a href="custom-scan-execution.html">61.3. Executing Custom Scans</a></span></dt><dd><dl><dt><span class="sect2"><a href="custom-scan-execution.html#CUSTOM-SCAN-EXECUTION-CALLBACKS">61.3.1. Custom Scan Execution Callbacks</a></span></dt></dl></dd></dl></div><a id="id-1.10.12.2" class="indexterm"></a><p>
<span class="productname">PostgreSQL</span> supports a set of experimental facilities which
are intended to allow extension modules to add new scan types to the system.
Unlike a <a class="link" href="fdwhandler.html" title="Chapter 59. Writing a Foreign Data Wrapper">foreign data wrapper</a>, which is only
responsible for knowing how to scan its own foreign tables, a custom scan
provider can provide an alternative method of scanning any relation in the
system. Typically, the motivation for writing a custom scan provider will
be to allow the use of some optimization not supported by the core
system, such as caching or some form of hardware acceleration. This chapter
outlines how to write a new custom scan provider.
</p><p>
Implementing a new type of custom scan is a three-step process. First,
during planning, it is necessary to generate access paths representing a
scan using the proposed strategy. Second, if one of those access paths
is selected by the planner as the optimal strategy for scanning a
particular relation, the access path must be converted to a plan.
Finally, it must be possible to execute the plan and generate the same
results that would have been generated for any other access path targeting
the same relation.
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="tablesample-support-functions.html" title="60.1. Sampling Method Support Functions">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="internals.html" title="Part VII. Internals">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="custom-scan-path.html" title="61.1. Creating Custom Scan Paths">Next</a></td></tr><tr><td width="40%" align="left" valign="top">60.1. Sampling Method Support Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.2 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 61.1. Creating Custom Scan Paths</td></tr></table></div></body></html>
|