gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 line
4.5KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!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 58. 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 V1.79.1" /><link rel="prev" href="tablesample-support-functions.html" title="57.1. Sampling Method Support Functions" /><link rel="next" href="custom-scan-path.html" title="58.1. Creating Custom Scan Paths" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Chapter 58. Writing a Custom Scan Provider</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="tablesample-support-functions.html" title="57.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 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="custom-scan-path.html" title="58.1. Creating Custom Scan Paths">Next</a></td></tr></table><hr></hr></div><div class="chapter" id="CUSTOM-SCAN"><div class="titlepage"><div><div><h2 class="title">Chapter 58. 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">58.1. Creating Custom Scan Paths</a></span></dt><dd><dl><dt><span class="sect2"><a href="custom-scan-path.html#CUSTOM-SCAN-PATH-CALLBACKS">58.1.1. Custom Scan Path Callbacks</a></span></dt></dl></dd><dt><span class="sect1"><a href="custom-scan-plan.html">58.2. Creating Custom Scan Plans</a></span></dt><dd><dl><dt><span class="sect2"><a href="custom-scan-plan.html#CUSTOM-SCAN-PLAN-CALLBACKS">58.2.1. Custom Scan Plan Callbacks</a></span></dt></dl></dd><dt><span class="sect1"><a href="custom-scan-execution.html">58.3. Executing Custom Scans</a></span></dt><dd><dl><dt><span class="sect2"><a href="custom-scan-execution.html#CUSTOM-SCAN-EXECUTION-CALLBACKS">58.3.1. Custom Scan Execution Callbacks</a></span></dt></dl></dd></dl></div><a id="id-1.10.11.2" class="indexterm"></a><p>
  3. <span class="productname">PostgreSQL</span> supports a set of experimental facilities which
  4. are intended to allow extension modules to add new scan types to the system.
  5. Unlike a <a class="link" href="fdwhandler.html" title="Chapter 56. Writing a Foreign Data Wrapper">foreign data wrapper</a>, which is only
  6. responsible for knowing how to scan its own foreign tables, a custom scan
  7. provider can provide an alternative method of scanning any relation in the
  8. system. Typically, the motivation for writing a custom scan provider will
  9. be to allow the use of some optimization not supported by the core
  10. system, such as caching or some form of hardware acceleration. This chapter
  11. outlines how to write a new custom scan provider.
  12. </p><p>
  13. Implementing a new type of custom scan is a three-step process. First,
  14. during planning, it is necessary to generate access paths representing a
  15. scan using the proposed strategy. Second, if one of those access paths
  16. is selected by the planner as the optimal strategy for scanning a
  17. particular relation, the access path must be converted to a plan.
  18. Finally, it must be possible to execute the plan and generate the same
  19. results that would have been generated for any other access path targeting
  20. the same relation.
  21. </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">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="internals.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="custom-scan-path.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">57.1. Sampling Method Support Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 58.1. Creating Custom Scan Paths</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1