8000 Doc: update documentation for creating custom scan paths. · postgres/postgres@0a1ff1d · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a1ff1d

Browse files
author
Etsuro Fujita
committed
Doc: update documentation for creating custom scan paths.
Commit f49842d added a new callback for custom scan paths, but missed updating the documentation. Back-patch to all supported branches. Discussion: https://postgr.es/m/CAPmGK15ODkN%2B%3DhkBCufj1HBW0x5OTb65Xuy7ryXchMdiCMpx_g%40mail.gmail.com
1 parent db395e2 commit 0a1ff1d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

doc/src/sgml/custom-scan.sgml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ typedef struct CustomPath
8383
by <literal>nodeToString</literal>, so that debugging routines that attempt to
8484
print the custom path will work as designed. <structfield>methods</structfield> must
8585
point to a (usually statically allocated) object implementing the required
86-
custom path methods, of which there is currently only one.
86+
custom path methods, which are further detailed below.
8787
</para>
8888

8989
<para>
@@ -123,6 +123,23 @@ Plan *(*PlanCustomPath) (PlannerInfo *root,
123123
be a <literal>CustomScan</literal> object, which the callback must allocate and
124124
initialize. See <xref linkend="custom-scan-plan"/> for more details.
125125
</para>
126+
127+
<para>
128+
<programlisting>
129+
List *(*ReparameterizeCustomPathByChild) (PlannerInfo *root,
130+
List *custom_private,
131+
RelOptInfo *child_rel);
132+
</programlisting>
133+
This callback is called while converting a path parameterized by the
134+
top-most parent of the given child relation <literal>child_rel</literal>
135+
to be parameterized by the child relation. The callback is used to
136+
reparameterize any paths or translate any expression nodes saved in the
137+
given <literal>custom_private</literal> member of a
138+
<structname>CustomPath</structname>. The callback may use
139+
<literal>reparameterize_path_by_child</literal>,
140+
<literal>adjust_appendrel_attrs</literal> or
141+
<literal>adjust_appendrel_attrs_multilevel</literal> as required.
142+
</para>
126143
</sect2>
127144
</sect1>
128145

0 commit comments

Comments
 (0)
0