Have postgres.bki self-identify - Mailing list pgsql-hackers

From David G. Johnston
Subject Have postgres.bki self-identify
Date
Msg-id CAKFQuwZfakLYiB+=o1C7GG-N6YHKOuK_3ap6znaSsTULr6G4Lw@mail.gmail.com
Whole thread Raw
Responses Re: Have postgres.bki self-identify
List pgsql-hackers
Hi!

While trying to find postgres.bki in my build directory searching for the file name didn't work because there is no comment in the file containing the file name; like there is in every other file we write or generate, including the related *_d.h files.  Add it.

It probably belongs before the version identifier but wasn't sure if that placement would be considered something worth retaining.

diff --git a/src/backend/catalog/genbki.pl b/src/backend/catalog/genbki.pl
index 2501307c92..175fde4acc 100644
--- a/src/backend/catalog/genbki.pl
+++ b/src/backend/catalog/genbki.pl
@@ -458,6 +458,9 @@ open my $syscache_info_fh, '>', $syscache_info_file . $tmpext
 # version marker for .bki file
 print $bki "# PostgreSQL $major_version\n";
 
+# self-identify file in comment per code policies.
+print $bki "# postgres.bki\n";
+
 # vars to hold data needed for schemapg.h
 my %schemapg_entries;
 my @tables_needing_macros;

David J.

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: AIO v2.5
Next
From: Noah Misch
Date:
Subject: Re: AIO v2.5