From a030113197005635bb6b36203f67b777ca086e22 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 29 May 2000 20:18:30 +0000 Subject: [PATCH] Tweak fmgrtab generation so that the F_XXX macros that give OIDs for built-in procedures are named after the prosrc field of pg_proc (ie, the actual C function name), not the proname field. This did not use to make a difference back when the two were always the same, but in the presence of overloaded proname values we'd best try to use the C name instead. AFAICT this change affects no existing code, but it is necessary to be able to get at some built-in functions that no macro was being generated for before. --- src/backend/utils/Gen_fmgrtab.sh.in | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/backend/utils/Gen_fmgrtab.sh.in b/src/backend/utils/Gen_fmgrtab.sh.in index f075ac28376..7b8dd1a9b90 100644 --- a/src/backend/utils/Gen_fmgrtab.sh.in +++ b/src/backend/utils/Gen_fmgrtab.sh.in @@ -9,7 +9,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.22 2000/05/28 17:56:05 tgl Exp $ +# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.23 2000/05/29 20:18:30 tgl Exp $ # # NOTES # Passes any -D options on to cpp prior to generating the list @@ -41,7 +41,7 @@ TABLEFILE=fmgrtab.c # # Generate the file containing raw pg_proc tuple data -# (but only for "internal" language procedures...). +# (but only for "internal" and "newinternal" language procedures...). # # Unlike genbki.sh, which can run through cpp last, we have to # deal with preprocessor statements first (before we sort the @@ -82,7 +82,7 @@ cat > $OIDSFILE < $OIDSFILE <> $OIDSFILE + { if (seenit[$(NF-1)]++ == 0) print "#define F_", $(NF-1), " ", $1; }' >> $OIDSFILE cat >> $OIDSFILE < $TABLEFILE <