From 9373baa0f764392c504df034afd2f6b178c29491 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Thu, 21 Dec 2017 19:07:32 -0300 Subject: Minor edits to catalog files and scripts This fixes a few typos and small mistakes; it also cleans a few minor stylistic issues. The biggest functional change is that Gen_fmgrtab.pl no longer knows the OID of language 'internal'. Author: John Naylor Discussion: https://postgr.es/m/CAJVSVGXAkwbk-A9QHHHf00N905kKisyQbaYwKqaRpze_gPXGfg@mail.gmail.com --- src/backend/utils/Gen_fmgrtab.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/Gen_fmgrtab.pl') diff --git a/src/backend/utils/Gen_fmgrtab.pl b/src/backend/utils/Gen_fmgrtab.pl index 26b428b11e3..14c02f5b57d 100644 --- a/src/backend/utils/Gen_fmgrtab.pl +++ b/src/backend/utils/Gen_fmgrtab.pl @@ -2,7 +2,8 @@ #------------------------------------------------------------------------- # # Gen_fmgrtab.pl -# Perl script that generates fmgroids.h and fmgrtab.c from pg_proc.h +# Perl script that generates fmgroids.h, fmgrprotos.h, and fmgrtab.c +# from pg_proc.h # # Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California @@ -56,6 +57,8 @@ die "No include path; you must specify -I at least once.\n" if !@include_path; my $FirstBootstrapObjectId = Catalog::FindDefinedSymbol('access/transam.h', \@include_path, 'FirstBootstrapObjectId'); +my $INTERNALlanguageId = + Catalog::FindDefinedSymbol('catalog/pg_language.h', \@include_path, 'INTERNALlanguageId'); # Read all the data from the include/catalog files. my $catalogs = Catalog::Catalogs($infile); @@ -77,8 +80,7 @@ foreach my $row (@$data) @bki_values{@attnames} = Catalog::SplitDataLine($row->{bki_values}); # Select out just the rows for internal-language procedures. - # Note assumption here that INTERNALlanguageId is 12. - next if $bki_values{prolang} ne '12'; + next if $bki_values{prolang} ne $INTERNALlanguageId; push @fmgr, { oid => $row->{oid}, @@ -281,7 +283,8 @@ sub usage die <. EOM -- cgit v1.2.3