|
439 | 439 | open my $def, '>', $def_file . $tmpext
|
440 | 440 | or die "can't open $def_file$tmpext: $!";
|
441 | 441 |
|
442 |
| - # Opening boilerplate for pg_*_d.h |
443 |
| - printf $def <<EOM, $catname, $catname, uc $catname, uc $catname; |
444 |
| -/*------------------------------------------------------------------------- |
445 |
| - * |
446 |
| - * %s_d.h |
447 |
| - * Macro definitions for %s |
448 |
| - * |
449 |
| - * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group |
450 |
| - * Portions Copyright (c) 1994, Regents of the University of California |
451 |
| - * |
452 |
| - * NOTES |
453 |
| - * ****************************** |
454 |
| - * *** DO NOT EDIT THIS FILE! *** |
455 |
| - * ****************************** |
456 |
| - * |
457 |
| - * It has been GENERATED by src/backend/catalog/genbki.pl |
458 |
| - * |
459 |
| - *------------------------------------------------------------------------- |
460 |
| - */ |
| 442 | + print_boilerplate($def, "${catname}_d.h", |
| 443 | + "Macro definitions for $catname"); |
| 444 | + printf $def <<EOM, uc $catname, uc $catname; |
461 | 445 | #ifndef %s_D_H
|
462 | 446 | #define %s_D_H
|
463 | 447 |
|
|
705 | 689 |
|
706 | 690 | # Now generate schemapg.h
|
707 | 691 |
|
708 |
| -# Opening boilerplate for schemapg.h |
| 692 | +print_boilerplate($schemapg, "schemapg.h", |
| 693 | + "Schema_pg_xxx macros for use by relcache.c"); |
709 | 694 | print $schemapg <<EOM;
|
710 |
| -/*------------------------------------------------------------------------- |
711 |
| - * |
712 |
| - * schemapg.h |
713 |
| - * Schema_pg_xxx macros for use by relcache.c |
714 |
| - * |
715 |
| - * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group |
716 |
| - * Portions Copyright (c) 1994, Regents of the University of California |
717 |
| - * |
718 |
| - * NOTES |
719 |
| - * ****************************** |
720 |
| - * *** DO NOT EDIT THIS FILE! *** |
721 |
| - * ****************************** |
722 |
| - * |
723 |
| - * It has been GENERATED by src/backend/catalog/genbki.pl |
724 |
| - * |
725 |
| - *------------------------------------------------------------------------- |
726 |
| - */ |
727 | 695 | #ifndef SCHEMAPG_H
|
728 | 696 | #define SCHEMAPG_H
|
729 | 697 | EOM
|
|
741 | 709 |
|
742 | 710 | # Now generate system_fk_info.h
|
743 | 711 |
|
744 |
| -# Opening boilerplate for system_fk_info.h |
| 712 | +print_boilerplate($fk_info, "system_fk_info.h", |
| 713 | + "Data about the foreign-key relationships in the system catalogs"); |
745 | 714 | print $fk_info <<EOM;
|
746 |
| -/*------------------------------------------------------------------------- |
747 |
| - * |
748 |
| - * system_fk_info.h |
749 |
| - * Data about the foreign-key relationships in the system catalogs |
750 |
| - * |
751 |
| - * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group |
752 |
| - * Portions Copyright (c) 1994, Regents of the University of California |
753 |
| - * |
754 |
| - * NOTES |
755 |
| - * ****************************** |
756 |
| - * *** DO NOT EDIT THIS FILE! *** |
757 |
| - * ****************************** |
758 |
| - * |
759 |
| - * It has been GENERATED by src/backend/catalog/genbki.pl |
760 |
| - * |
761 |
| - *------------------------------------------------------------------------- |
762 |
| - */ |
763 | 715 | #ifndef SYSTEM_FK_INFO_H
|
764 | 716 | #define SYSTEM_FK_INFO_H
|
765 | 717 |
|
@@ -1121,6 +1073,30 @@ sub assign_next_oid
|
1121 | 1073 | return $result;
|
1122 | 1074 | }
|
1123 | 1075 |
|
| 1076 | +sub print_boilerplate |
| 1077 | +{ |
| 1078 | + my ($fh, $fname, $descr) = @_; |
| 1079 | + printf $fh <<EOM, $fname, $descr; |
| 1080 | +/*------------------------------------------------------------------------- |
| 1081 | + * |
| 1082 | + * %s |
| 1083 | + * %s |
| 1084 | + * |
| 1085 | + * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group |
| 1086 | + * Portions Copyright (c) 1994, Regents of the University of California |
| 1087 | + * |
| 1088 | + * NOTES |
| 1089 | + * ****************************** |
| 1090 | + * *** DO NOT EDIT THIS FILE! *** |
| 1091 | + * ****************************** |
| 1092 | + * |
| 1093 | + * It has been GENERATED by src/backend/catalog/genbki.pl |
| 1094 | + * |
| 1095 | + *------------------------------------------------------------------------- |
| 1096 | + */ |
| 1097 | +EOM |
| 1098 | +} |
| 1099 | + |
1124 | 1100 | sub usage
|
1125 | 1101 | {
|
1126 | 1102 | die <<EOM;
|
|
0 commit comments