mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Doc: update documentation for creating custom scan paths.
Commit f49842d1e 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
			
			
This commit is contained in:
		@@ -90,7 +90,7 @@ typedef struct CustomPath
 | 
				
			|||||||
    by <literal>nodeToString</literal>, so that debugging routines that attempt to
 | 
					    by <literal>nodeToString</literal>, so that debugging routines that attempt to
 | 
				
			||||||
    print the custom path will work as designed.  <structfield>methods</structfield> must
 | 
					    print the custom path will work as designed.  <structfield>methods</structfield> must
 | 
				
			||||||
    point to a (usually statically allocated) object implementing the required
 | 
					    point to a (usually statically allocated) object implementing the required
 | 
				
			||||||
    custom path methods, of which there is currently only one.
 | 
					    custom path methods, which are further detailed below.
 | 
				
			||||||
  </para>
 | 
					  </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <para>
 | 
					  <para>
 | 
				
			||||||
@@ -130,6 +130,23 @@ Plan *(*PlanCustomPath) (PlannerInfo *root,
 | 
				
			|||||||
    be a <literal>CustomScan</literal> object, which the callback must allocate and
 | 
					    be a <literal>CustomScan</literal> object, which the callback must allocate and
 | 
				
			||||||
    initialize.  See <xref linkend="custom-scan-plan"/> for more details.
 | 
					    initialize.  See <xref linkend="custom-scan-plan"/> for more details.
 | 
				
			||||||
   </para>
 | 
					   </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   <para>
 | 
				
			||||||
 | 
					<programlisting>
 | 
				
			||||||
 | 
					List *(*ReparameterizeCustomPathByChild) (PlannerInfo *root,
 | 
				
			||||||
 | 
					                                          List *custom_private,
 | 
				
			||||||
 | 
					                                          RelOptInfo *child_rel);
 | 
				
			||||||
 | 
					</programlisting>
 | 
				
			||||||
 | 
					    This callback is called while converting a path parameterized by the
 | 
				
			||||||
 | 
					    top-most parent of the given child relation <literal>child_rel</literal>
 | 
				
			||||||
 | 
					    to be parameterized by the child relation.  The callback is used to
 | 
				
			||||||
 | 
					    reparameterize any paths or translate any expression nodes saved in the
 | 
				
			||||||
 | 
					    given <literal>custom_private</literal> member of a
 | 
				
			||||||
 | 
					    <structname>CustomPath</structname>.  The callback may use
 | 
				
			||||||
 | 
					    <literal>reparameterize_path_by_child</literal>,
 | 
				
			||||||
 | 
					    <literal>adjust_appendrel_attrs</literal> or
 | 
				
			||||||
 | 
					    <literal>adjust_appendrel_attrs_multilevel</literal> as required.
 | 
				
			||||||
 | 
					   </para>
 | 
				
			||||||
  </sect2>
 | 
					  </sect2>
 | 
				
			||||||
 </sect1>
 | 
					 </sect1>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user