mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Invent nodetag_only attribute for Nodes.
This allows explaining gen_node_support.pl's handling of execnodes.h and some other input files as being a shortcut for explicit marking of all their node declarations as pg_node_attr(nodetag_only). I foresee that someday we might need to be more fine-grained about that, and this change provides the infrastructure needed to do so. For now, it just allows removal of the script's klugy special case for CallContext and InlineCodeBlock. Discussion: https://postgr.es/m/75063.1657410615@sss.pgh.pa.us
This commit is contained in:
		@@ -61,12 +61,17 @@ typedef enum NodeTag
 | 
			
		||||
 *
 | 
			
		||||
 * - no_read: Does not support nodeRead() at all.
 | 
			
		||||
 *
 | 
			
		||||
 * - nodetag_only: Does not support copyObject(), equal(), outNode(),
 | 
			
		||||
 *   or nodeRead().
 | 
			
		||||
 *
 | 
			
		||||
 * - special_read_write: Has special treatment in outNode() and nodeRead().
 | 
			
		||||
 *
 | 
			
		||||
 * Node types can be supertypes of other types whether or not they are marked
 | 
			
		||||
 * abstract: if a node struct appears as the first field of another struct
 | 
			
		||||
 * type, then it is the supertype of that type.  The no_copy, no_equal, and
 | 
			
		||||
 * no_read node attributes are automatically inherited from the supertype.
 | 
			
		||||
 * (Notice that nodetag_only does not inherit, so it's not quite equivalent
 | 
			
		||||
 * to a combination of other attributes.)
 | 
			
		||||
 *
 | 
			
		||||
 * Valid node field attributes:
 | 
			
		||||
 *
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user