diff --git a/src/backend/nodes/gen_node_support.pl b/src/backend/nodes/gen_node_support.pl
index 6816c36e2b..41d824870b 100644
--- a/src/backend/nodes/gen_node_support.pl
+++ b/src/backend/nodes/gen_node_support.pl
@@ -426,10 +426,34 @@ foreach my $infile (@ARGV)
 
 my $tmpext = ".tmp$$";
 
+# opening boilerplate for output files
+my $header_comment =
+  '/*-------------------------------------------------------------------------
+ *
+ * %s
+ *    Generated node infrastructure code
+ *
+ * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * NOTES
+ *  ******************************
+ *  *** DO NOT EDIT THIS FILE! ***
+ *  ******************************
+ *
+ *  It has been GENERATED by src/backend/nodes/gen_node_support.pl
+ *
+ *-------------------------------------------------------------------------
+ */
+';
+
+
 # nodetags.h
 
 open my $nt, '>', 'nodetags.h' . $tmpext or die $!;
 
+printf $nt $header_comment, 'nodetags.h';
+
 my $i = 1;
 foreach my $n (@node_types, @extra_tags)
 {
@@ -457,6 +481,11 @@ open my $eff, '>', 'equalfuncs.funcs.c' . $tmpext  or die $!;
 open my $cfs, '>', 'copyfuncs.switch.c' . $tmpext  or die $!;
 open my $efs, '>', 'equalfuncs.switch.c' . $tmpext or die $!;
 
+printf $cff $header_comment, 'copyfuncs.funcs.c';
+printf $eff $header_comment, 'equalfuncs.funcs.c';
+printf $cfs $header_comment, 'copyfuncs.switch.c';
+printf $efs $header_comment, 'equalfuncs.switch.c';
+
 # add required #include lines to each file set
 print $cff $node_includes;
 print $eff $node_includes;
@@ -640,6 +669,11 @@ open my $rff, '>', 'readfuncs.funcs.c' . $tmpext  or die $!;
 open my $ofs, '>', 'outfuncs.switch.c' . $tmpext  or die $!;
 open my $rfs, '>', 'readfuncs.switch.c' . $tmpext or die $!;
 
+printf $off $header_comment, 'outfuncs.funcs.c';
+printf $rff $header_comment, 'readfuncs.funcs.c';
+printf $ofs $header_comment, 'outfuncs.switch.c';
+printf $rfs $header_comment, 'readfuncs.switch.c';
+
 print $off $node_includes;
 print $rff $node_includes;
 
