#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh.in,v 1.4 1999/11/04 08:00:56 inoue Exp $
+# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh.in,v 1.5 2000/01/11 04:02:28 tgl Exp $
#
# NOTES
# non-essential whitespace is removed from the generated file.
done
# Get NAMEDATALEN from postgres_ext.h
-NAMEDATALEN=`grep '#define.*NAMEDATALEN' ../../include/postgres_ext.h | awk '{ print $3 }'`
+NAMEDATALEN=`grep '#define[ ]*NAMEDATALEN' ../../include/postgres_ext.h | awk '{ print $3 }'`
+
+# Get INDEX_MAX_KEYS from config.h (who needs consistency?)
+INDEXMAXKEYS=`grep '#define[ ]*INDEX_MAX_KEYS' ../../include/config.h | awk '{ print $3 }'`
+
+# NOTE: we assume here that FUNC_MAX_ARGS has the same value as INDEX_MAX_KEYS,
+# and don't read it separately from config.h. This is OK because both of them
+# must be equal to the length of oidvector.
+
+INDEXMAXKEYS2=`expr $INDEXMAXKEYS '*' 2`
+INDEXMAXKEYS4=`expr $INDEXMAXKEYS '*' 4`
# ----------------
# strip comments and trash from .h before we generate
-e "s/(NameData/(name/g" \
-e "s/(Oid/(oid/g" \
-e "s/NAMEDATALEN/$NAMEDATALEN/g" \
+ -e "s/INDEX_MAX_KEYS\*2/$INDEXMAXKEYS2/g" \
+ -e "s/INDEX_MAX_KEYS\*4/$INDEXMAXKEYS4/g" \
+ -e "s/INDEX_MAX_KEYS/$INDEXMAXKEYS/g" \
+ -e "s/FUNC_MAX_ARGS\*2/$INDEXMAXKEYS2/g" \
+ -e "s/FUNC_MAX_ARGS\*4/$INDEXMAXKEYS4/g" \
+ -e "s/FUNC_MAX_ARGS/$INDEXMAXKEYS/g" \
| awk '
# ----------------
# now use awk to process remaining .h file..
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_type.h,v 1.74 2000/01/10 20:23:31 momjian Exp $
+ * $Id: pg_type.h,v 1.75 2000/01/11 04:02:28 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
DESCR("-32 thousand to 32 thousand, 2-byte storage");
#define INT2OID 21
-DATA(insert OID = 22 ( int2vector PGUID 32 113 f b t \054 0 21 int2vectorin int2vectorout int2vectorin int2vectorout i _null_ ));
-DESCR("16 int2 integers, used internally");
+DATA(insert OID = 22 ( int2vector PGUID INDEX_MAX_KEYS*2 -1 f b t \054 0 21 int2vectorin int2vectorout int2vectorin int2vectorout i _null_ ));
+DESCR("array of INDEX_MAX_KEYS int2 integers, used in system tables");
/*
* XXX -- the implementation of int2vector's in postgres is a hack, and will
* go away someday. until that happens, there is a case (in the
DESCR("command identifier type, sequence in transaction id");
#define CIDOID 29
-DATA(insert OID = 30 ( oidvector PGUID 64 193 f b t \054 0 26 oidvectorin oidvectorout oidvectorin oidvectorout i _null_ ));
-DESCR("array of 16 oids, used in system tables");
+DATA(insert OID = 30 ( oidvector PGUID INDEX_MAX_KEYS*4 -1 f b t \054 0 26 oidvectorin oidvectorout oidvectorin oidvectorout i _null_ ));
+DESCR("array of INDEX_MAX_KEYS oids, used in system tables");
DATA(insert OID = 32 ( SET PGUID -1 -1 f b t \054 0 0 textin textout textin textout i _null_ ));
DESCR("set of tuples");