Skip to content

Commit cd72c1b

Browse files
committed
Label the contents of pg_*_d.h files a little better.
Make genbki.pl emit some boilerplate comments identifying the sections of the pg_*_d.h files that it generates. This is in hopes of making them slightly more readable, in case people look at those files and not the pg_*.h/pg_*.dat originals. Discussion: https://postgr.es/m/1134562.1742507765@sss.pgh.pa.us
1 parent 69273b8 commit cd72c1b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/catalog/genbki.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@
480480
481481
EOM
482482
483+
printf $def "/* Macros related to the structure of $catname */\n\n";
484+
483485
# Emit OID macros for catalog's OID and rowtype OID, if wanted
484486
printf $def "#define %s %s\n",
485487
$catalog->{relation_oid_macro}, $catalog->{relation_oid}
@@ -561,6 +563,7 @@
561563
print $def "\n#define Natts_$catname $attnum\n\n";
562564
563565
# Emit client code copied from source header
566+
printf $def "/* Definitions copied from ${catname}.h */\n\n";
564567
foreach my $line (@{ $catalog->{client_code} })
565568
{
566569
print $def $line;
@@ -573,6 +576,9 @@
573576
print $bki "open $catname\n";
574577
}
575578
579+
printf $def
580+
"\n/* OID symbols for objects defined in ${catname}.dat */\n\n";
581+
576582
# For pg_attribute.h, we generate data entries ourselves.
577583
if ($catname eq 'pg_attribute')
578584
{

0 commit comments

Comments
 (0)