mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Doc: fix mistaken reference to "PG_ARGNULL_xxx()" macro.
This should of course be just "PG_ARGISNULL()". Also reorder a couple of paras to make the discussion of PG_ARGISNULL less disjointed. Back-patch to v10 where the error was introduced. Laurenz Albe and Tom Lane, per an anonymous docs comment Discussion: https://postgr.es/m/158399487096.5708.10696365251766477013@wrigleys.postgresql.org
This commit is contained in:
		@@ -2200,9 +2200,9 @@ PG_FUNCTION_INFO_V1(funcname);
 | 
				
			|||||||
    <para>
 | 
					    <para>
 | 
				
			||||||
     In a version-1 function, each actual argument is fetched using a
 | 
					     In a version-1 function, each actual argument is fetched using a
 | 
				
			||||||
     <function>PG_GETARG_<replaceable>xxx</replaceable>()</function>
 | 
					     <function>PG_GETARG_<replaceable>xxx</replaceable>()</function>
 | 
				
			||||||
     macro that corresponds to the argument's data type.  In non-strict
 | 
					     macro that corresponds to the argument's data type.  (In non-strict
 | 
				
			||||||
     functions there needs to be a previous check about argument null-ness
 | 
					     functions there needs to be a previous check about argument null-ness
 | 
				
			||||||
     using <function>PG_ARGNULL_<replaceable>xxx</replaceable>()</function>.
 | 
					     using <function>PG_ARGISNULL()</function>; see below.)
 | 
				
			||||||
     The result is returned using a
 | 
					     The result is returned using a
 | 
				
			||||||
     <function>PG_RETURN_<replaceable>xxx</replaceable>()</function>
 | 
					     <function>PG_RETURN_<replaceable>xxx</replaceable>()</function>
 | 
				
			||||||
     macro for the return type.
 | 
					     macro for the return type.
 | 
				
			||||||
@@ -2366,14 +2366,6 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
 | 
				
			|||||||
     explicitly, using <function>PG_ARGISNULL()</function>.
 | 
					     explicitly, using <function>PG_ARGISNULL()</function>.
 | 
				
			||||||
    </para>
 | 
					    </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <para>
 | 
					 | 
				
			||||||
     At first glance, the version-1 coding conventions might appear to be just
 | 
					 | 
				
			||||||
     pointless obscurantism, over using plain <literal>C</> calling
 | 
					 | 
				
			||||||
     conventions.  They do however allow to deal with <literal>NULL</>able
 | 
					 | 
				
			||||||
     arguments/return values, and <quote>toasted</quote> (compressed or
 | 
					 | 
				
			||||||
     out-of-line) values.
 | 
					 | 
				
			||||||
    </para>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <para>
 | 
					    <para>
 | 
				
			||||||
     The macro <function>PG_ARGISNULL(<replaceable>n</>)</function>
 | 
					     The macro <function>PG_ARGISNULL(<replaceable>n</>)</function>
 | 
				
			||||||
     allows a function to test whether each input is null.  (Of course, doing
 | 
					     allows a function to test whether each input is null.  (Of course, doing
 | 
				
			||||||
@@ -2388,6 +2380,14 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
 | 
				
			|||||||
     this works in both strict and nonstrict functions.
 | 
					     this works in both strict and nonstrict functions.
 | 
				
			||||||
    </para>
 | 
					    </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <para>
 | 
				
			||||||
 | 
					     At first glance, the version-1 coding conventions might appear
 | 
				
			||||||
 | 
					     to be just pointless obscurantism, compared to using
 | 
				
			||||||
 | 
					     plain <literal>C</literal> calling conventions.  They do however allow
 | 
				
			||||||
 | 
					     us to deal with <literal>NULL</literal>able arguments/return values,
 | 
				
			||||||
 | 
					     and <quote>toasted</quote> (compressed or out-of-line) values.
 | 
				
			||||||
 | 
					    </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <para>
 | 
					    <para>
 | 
				
			||||||
     Other options provided by the version-1 interface are two
 | 
					     Other options provided by the version-1 interface are two
 | 
				
			||||||
     variants of the
 | 
					     variants of the
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user