aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2007-02-06 09:16:08 +0000
committerPeter Eisentraut <peter_e@gmx.net>2007-02-06 09:16:08 +0000
commit037f8413fa42562a8b7a075a66faa8fd88247753 (patch)
tree5f647e09d7c7e3e9ddd2687f5b31e9b0eb6dbc55 /src
parent56e59edd7509f8726157cd8039529fc077f57ebb (diff)
downloadpostgresql-037f8413fa42562a8b7a075a66faa8fd88247753.tar.gz
postgresql-037f8413fa42562a8b7a075a66faa8fd88247753.zip
Move NAMEDATALEN definition from postgres_ext.h to pg_config_manual.h. It
used to be part of libpq's exported interface many releases ago, but now it's no longer necessary to make it accessible to clients.
Diffstat (limited to 'src')
-rw-r--r--src/backend/catalog/Makefile5
-rw-r--r--src/backend/catalog/genbki.sh10
-rw-r--r--src/include/pg_config_manual.h11
-rw-r--r--src/include/postgres_ext.h12
-rwxr-xr-xsrc/tools/msvc/genbki.pl6
5 files changed, 21 insertions, 23 deletions
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index 110619425b1..0482467bbbe 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -2,7 +2,7 @@
#
# Makefile for backend/catalog
#
-# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.61 2006/12/23 00:43:09 tgl Exp $
+# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.62 2007/02/06 09:16:08 petere Exp $
#
#-------------------------------------------------------------------------
@@ -45,8 +45,7 @@ postgres.description: postgres.bki ;
postgres.shdescription: postgres.bki ;
-postgres.bki: genbki.sh $(POSTGRES_BKI_SRCS) \
- $(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/pg_config_manual.h
+postgres.bki: genbki.sh $(POSTGRES_BKI_SRCS) $(top_builddir)/src/include/pg_config_manual.h
AWK='$(AWK)' $(SHELL) $< $(pg_includes) --set-version=$(VERSION) -o postgres $(POSTGRES_BKI_SRCS)
.PHONY: install-data
diff --git a/src/backend/catalog/genbki.sh b/src/backend/catalog/genbki.sh
index d257d94db0c..2ec896d299e 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.41 2007/01/05 22:19:24 momjian Exp $
+# $PostgreSQL: pgsql/src/backend/catalog/genbki.sh,v 1.42 2007/02/06 09:16:08 petere 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 postgres_ext.h and pg_config_manual.h files"
+ echo " -I path to pg_config_manual.h file"
echo " -o prefix of output files"
echo " --set-version PostgreSQL version number for initdb cross-check"
echo
@@ -106,10 +106,10 @@ TMPFILE="genbkitmp$$.c"
trap "rm -f $TMPFILE ${OUTPUT_PREFIX}.bki.$$ ${OUTPUT_PREFIX}.description.$$ ${OUTPUT_PREFIX}.shdescription.$$" 0 1 2 3 15
-# Get NAMEDATALEN from postgres_ext.h
+# Get NAMEDATALEN from pg_config_manual.h
for dir in $INCLUDE_DIRS; do
- if [ -f "$dir/postgres_ext.h" ]; then
- NAMEDATALEN=`grep '^#define[ ]*NAMEDATALEN' $dir/postgres_ext.h | $AWK '{ print $3 }'`
+ if [ -f "$dir/pg_config_manual.h" ]; then
+ NAMEDATALEN=`grep '^#define[ ]*NAMEDATALEN' $dir/pg_config_manual.h | $AWK '{ print $3 }'`
break
fi
done
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index d41d5619966..074833d1984 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -6,7 +6,7 @@
* for developers. If you edit any of these, be sure to do a *full*
* rebuild (and an initdb if noted).
*
- * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.23 2006/09/18 22:40:40 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.24 2007/02/06 09:16:08 petere Exp $
*------------------------------------------------------------------------
*/
@@ -63,6 +63,15 @@
#define XLOG_SEG_SIZE (16*1024*1024)
/*
+ * Maximum length for identifiers (e.g. table names, column names,
+ * function names). It must be a multiple of sizeof(int) (typically
+ * 4).
+ *
+ * Changing this requires an initdb.
+ */
+#define NAMEDATALEN 64
+
+/*
* Maximum number of arguments to a function.
*
* The minimum value is 8 (index cost estimation uses 8-argument functions).
diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h
index efffad2c7ce..51a18b7dcc3 100644
--- a/src/include/postgres_ext.h
+++ b/src/include/postgres_ext.h
@@ -15,7 +15,7 @@
* use header files that are otherwise internal to Postgres to interface
* with the backend.
*
- * $PostgreSQL: pgsql/src/include/postgres_ext.h,v 1.16 2004/08/29 05:06:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/postgres_ext.h,v 1.17 2007/02/06 09:16:08 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -39,16 +39,6 @@ typedef unsigned int Oid;
/*
- * NAMEDATALEN is the max length for system identifiers (e.g. table names,
- * attribute names, function names, etc). It must be a multiple of
- * sizeof(int) (typically 4).
- *
- * NOTE that databases with different NAMEDATALEN's cannot interoperate!
- */
-#define NAMEDATALEN 64
-
-
-/*
* Identifiers of error message fields. Kept here to keep common
* between frontend and backend, and also to export them to libpq
* applications.
diff --git a/src/tools/msvc/genbki.pl b/src/tools/msvc/genbki.pl
index f69b8073a11..7fd0bdd5e6b 100755
--- a/src/tools/msvc/genbki.pl
+++ b/src/tools/msvc/genbki.pl
@@ -11,7 +11,7 @@
#
#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/tools/msvc/genbki.pl,v 1.2 2007/01/05 22:20:05 momjian Exp $
+# $PostgreSQL: pgsql/src/tools/msvc/genbki.pl,v 1.3 2007/02/06 09:16:08 petere Exp $
#
#-------------------------------------------------------------------------
@@ -24,8 +24,8 @@ my $prefix = shift || Usage();
$version =~ /^(\d+\.\d+)/ || die "Bad format verison $version\n";
my $majorversion = $1;
-my $pgext = read_file("src/include/postgres_ext.h");
-$pgext =~ /^#define\s+NAMEDATALEN\s+(\d+)$/mg || die "Could not read NAMEDATALEN from postgres_ext.h\n";
+my $pgext = read_file("src/include/pg_config_manual.h");
+$pgext =~ /^#define\s+NAMEDATALEN\s+(\d+)$/mg || die "Could not read NAMEDATALEN from pg_config_manual.h\n";
my $namedatalen = $1;
my $pgauthid = read_file("src/include/catalog/pg_authid.h");