aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-03-21 15:09:46 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-03-21 15:09:46 -0400
commitcd72c1b76e36525fb6b23418d232df661634afd5 (patch)
treef7608198449037e9d16fec86b0bc48b3918a6ecc /src
parent69273b818b1df82c36b2b2acb592db3d0743cc7c (diff)
downloadpostgresql-cd72c1b76e36525fb6b23418d232df661634afd5.tar.gz
postgresql-cd72c1b76e36525fb6b23418d232df661634afd5.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/catalog/genbki.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/catalog/genbki.pl b/src/backend/catalog/genbki.pl
index 2501307c92e..df3231fcd41 100644
--- a/src/backend/catalog/genbki.pl
+++ b/src/backend/catalog/genbki.pl
@@ -480,6 +480,8 @@ foreach my $catname (@catnames)
EOM
+ printf $def "/* Macros related to the structure of $catname */\n\n";
+
# Emit OID macros for catalog's OID and rowtype OID, if wanted
printf $def "#define %s %s\n",
$catalog->{relation_oid_macro}, $catalog->{relation_oid}
@@ -561,6 +563,7 @@ EOM
print $def "\n#define Natts_$catname $attnum\n\n";
# Emit client code copied from source header
+ printf $def "/* Definitions copied from ${catname}.h */\n\n";
foreach my $line (@{ $catalog->{client_code} })
{
print $def $line;
@@ -573,6 +576,9 @@ EOM
print $bki "open $catname\n";
}
+ printf $def
+ "\n/* OID symbols for objects defined in ${catname}.dat */\n\n";
+
# For pg_attribute.h, we generate data entries ourselves.
if ($catname eq 'pg_attribute')
{