diff options
author | Alvaro Herrera | 2017-12-21 22:07:32 +0000 |
---|---|---|
committer | Alvaro Herrera | 2017-12-21 22:07:32 +0000 |
commit | 9373baa0f764392c504df034afd2f6b178c29491 (patch) | |
tree | baf81224a03edefecfcc5d30c2a815dbc8a6351f /src/backend/utils/Gen_fmgrtab.pl | |
parent | cce1ecfc77385233664de661d6a1b8b3c5d3d3f5 (diff) |
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
Diffstat (limited to 'src/backend/utils/Gen_fmgrtab.pl')
-rw-r--r-- | src/backend/utils/Gen_fmgrtab.pl | 11 |
1 files changed, 7 insertions, 4 deletions
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; Usage: perl -I [directory of Catalog.pm] Gen_fmgrtab.pl [path to pg_proc.h] -Gen_fmgrtab.pl generates fmgroids.h and fmgrtab.c from pg_proc.h +Gen_fmgrtab.pl generates fmgroids.h, fmgrprotos.h, and fmgrtab.c from +pg_proc.h Report bugs to <pgsql-bugs\@postgresql.org>. EOM |