mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Revise handling of oldstyle/newstyle functions per recent discussions
in pghackers list. Support for oldstyle internal functions is gone (no longer needed, since conversion is complete) and pg_language entry 'internal' now implies newstyle call convention. pg_language entry 'newC' is gone; both old and newstyle dynamically loaded C functions are now called language 'C'. A newstyle function must be identified by an associated info routine. See src/backend/utils/fmgr/README.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.17 2000/07/13 16:07:06 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.18 2000/11/20 20:36:48 tgl Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -82,7 +82,7 @@ trap 'echo "Caught signal." ; cleanup ; exit 1' 1 2 15
|
||||
|
||||
#
|
||||
# Generate the file containing raw pg_proc tuple data
|
||||
# (but only for "internal" and "newinternal" language procedures...).
|
||||
# (but only for "internal" language procedures...).
|
||||
#
|
||||
# Unlike genbki.sh, which can run through cpp last, we have to
|
||||
# deal with preprocessor statements first (before we sort the
|
||||
@@ -99,7 +99,6 @@ sed -e 's/^.*OID[^=]*=[^0-9]*//' \
|
||||
-e 's/[ ]*).*$//' | \
|
||||
$AWK '
|
||||
/^#/ { print; next; }
|
||||
$4 == "11" { print; next; }
|
||||
$4 == "12" { print; next; }' > $CPPTMPFILE
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
@@ -182,10 +181,6 @@ FuNkYfMgRsTuFf
|
||||
# Generate fmgr's built-in-function table.
|
||||
#
|
||||
# Print out the function declarations, then the table that refers to them.
|
||||
# NB: the function declarations are bogus in the case of old-style functions,
|
||||
# although they should be correct for new-style. Therefore we need to compile
|
||||
# this table definition as a separate C file that won't need to include any
|
||||
# "real" declarations for those functions!
|
||||
#
|
||||
cat > "$$-$TABLEFILE" <<FuNkYfMgRtAbStUfF
|
||||
/*-------------------------------------------------------------------------
|
||||
@@ -205,10 +200,6 @@ cat > "$$-$TABLEFILE" <<FuNkYfMgRtAbStUfF
|
||||
* It has been GENERATED by $CMDNAME
|
||||
* from $INFILE
|
||||
*
|
||||
* We lie here to cc about the return type and arguments of old-style
|
||||
* builtin functions; all ld cares about is the fact that it
|
||||
* will need to resolve an external function reference.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -237,13 +228,11 @@ FuNkYfMgRtAbStUfF
|
||||
# conditional expression instead. Not all awks have conditional expressions.
|
||||
|
||||
$AWK 'BEGIN {
|
||||
Strict["t"] = "true"
|
||||
Strict["f"] = "false"
|
||||
OldStyle["11"] = "true"
|
||||
OldStyle["12"] = "false"
|
||||
Bool["t"] = "true"
|
||||
Bool["f"] = "false"
|
||||
}
|
||||
{ printf (" { %d, \"%s\", %d, %s, %s, %s },\n"), \
|
||||
$1, $(NF-1), $9, Strict[$8], OldStyle[$4], $(NF-1)
|
||||
$1, $(NF-1), $9, Bool[$8], Bool[$10], $(NF-1)
|
||||
}' $RAWFILE >> "$$-$TABLEFILE"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user