aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/catalog/genbki.sh28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/backend/catalog/genbki.sh b/src/backend/catalog/genbki.sh
index a07af451670..f5445010854 100644
--- a/src/backend/catalog/genbki.sh
+++ b/src/backend/catalog/genbki.sh
@@ -11,7 +11,7 @@
#
#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/backend/catalog/genbki.sh,v 1.44 2008/04/21 00:26:45 tgl Exp $
+# $PostgreSQL: pgsql/src/backend/catalog/genbki.sh,v 1.45 2008/07/19 04:01:29 tgl Exp $
#
# NOTES
# non-essential whitespace is removed from the generated file.
@@ -59,7 +59,7 @@ do
echo " $CMDNAME [ -I dir ] --set-version=VERSION -o prefix files..."
echo
echo "Options:"
- echo " -I path to pg_config_manual.h file"
+ echo " -I path to include files"
echo " -o prefix of output files"
echo " --set-version PostgreSQL version number for initdb cross-check"
echo
@@ -106,22 +106,11 @@ TMPFILE="genbkitmp$$.c"
trap "rm -f $TMPFILE ${OUTPUT_PREFIX}.bki.$$ ${OUTPUT_PREFIX}.description.$$ ${OUTPUT_PREFIX}.shdescription.$$" 0 1 2 3 15
-# Get NAMEDATALEN from pg_config_manual.h
-for dir in $INCLUDE_DIRS; do
- if [ -f "$dir/pg_config_manual.h" ]; then
- NAMEDATALEN=`grep '^#define[ ]*NAMEDATALEN' $dir/pg_config_manual.h | $AWK '{ print $3 }'`
- break
- fi
-done
-
-# Get FLOAT4PASSBYVAL and FLOAT8PASSBYVAL from pg_config.h
-for dir in $INCLUDE_DIRS; do
- if [ -f "$dir/pg_config.h" ]; then
- FLOAT4PASSBYVAL=`grep '^#define[ ]*FLOAT4PASSBYVAL' $dir/pg_config.h | $AWK '{ print $3 }'`
- FLOAT8PASSBYVAL=`grep '^#define[ ]*FLOAT8PASSBYVAL' $dir/pg_config.h | $AWK '{ print $3 }'`
- break
- fi
-done
+# CAUTION: be wary about what symbols you substitute into the .bki file here!
+# It's okay to substitute things that are expected to be really constant
+# within a given Postgres release, such as fixed OIDs. Do not substitute
+# anything that could depend on platform or configuration. (The right place
+# to handle those sorts of things is in initdb.c's bootstrap_template1().)
# Get BOOTSTRAP_SUPERUSERID from catalog/pg_authid.h
for dir in $INCLUDE_DIRS; do
@@ -172,9 +161,6 @@ sed -e "s/;[ ]*$//g" \
-e "s/^TransactionId/xid/g" \
-e "s/(TransactionId/(xid/g" \
-e "s/PGUID/$BOOTSTRAP_SUPERUSERID/g" \
- -e "s/NAMEDATALEN/$NAMEDATALEN/g" \
- -e "s/FLOAT4PASSBYVAL/$FLOAT4PASSBYVAL/g" \
- -e "s/FLOAT8PASSBYVAL/$FLOAT8PASSBYVAL/g" \
-e "s/PGNSP/$PG_CATALOG_NAMESPACE/g" \
| $AWK '
# ----------------