Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit037f841

Browse files
committed
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 nowit's no longer necessary to make it accessible to clients.
1 parent56e59ed commit037f841

File tree

6 files changed

+23
-25
lines changed

6 files changed

+23
-25
lines changed

‎doc/src/sgml/syntax.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.114 2007/02/01 19:10:24 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.115 2007/02/06 09:16:07 petere Exp $ -->
22

33
<chapter id="sql-syntax">
44
<title>SQL Syntax</title>
@@ -136,7 +136,7 @@ INSERT INTO MY_TABLE VALUES (3, 'hi there');
136136
<symbol>NAMEDATALEN</symbol> is 64 so the maximum identifier
137137
length is 63. If this limit is problematic, it can be raised by
138138
changing the <symbol>NAMEDATALEN</symbol> constant in
139-
<filename>src/include/postgres_ext.h</filename>.
139+
<filename>src/include/pg_config_manual.h</filename>.
140140
</para>
141141

142142
<para>

‎src/backend/catalog/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for backend/catalog
44
#
5-
# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.61 2006/12/23 00:43:09 tgl Exp $
5+
# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.62 2007/02/06 09:16:08 petere Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -45,8 +45,7 @@ postgres.description: postgres.bki ;
4545

4646
postgres.shdescription: postgres.bki ;
4747

48-
postgres.bki: genbki.sh$(POSTGRES_BKI_SRCS)\
49-
$(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/pg_config_manual.h
48+
postgres.bki: genbki.sh$(POSTGRES_BKI_SRCS)$(top_builddir)/src/include/pg_config_manual.h
5049
AWK='$(AWK)'$(SHELL)$<$(pg_includes) --set-version=$(VERSION) -o postgres$(POSTGRES_BKI_SRCS)
5150

5251
.PHONY: install-data

‎src/backend/catalog/genbki.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
#
1313
# IDENTIFICATION
14-
# $PostgreSQL: pgsql/src/backend/catalog/genbki.sh,v 1.41 2007/01/05 22:19:24 momjian Exp $
14+
# $PostgreSQL: pgsql/src/backend/catalog/genbki.sh,v 1.42 2007/02/06 09:16:08 petere Exp $
1515
#
1616
# NOTES
1717
# non-essential whitespace is removed from the generated file.
@@ -59,7 +59,7 @@ do
5959
echo"$CMDNAME [ -I dir ] --set-version=VERSION -o prefix files..."
6060
echo
6161
echo"Options:"
62-
echo" -I path topostgres_ext.h andpg_config_manual.hfiles"
62+
echo" -I path to pg_config_manual.hfile"
6363
echo" -o prefix of output files"
6464
echo" --set-version PostgreSQL version number for initdb cross-check"
6565
echo
@@ -106,10 +106,10 @@ TMPFILE="genbkitmp$$.c"
106106
trap"rm -f$TMPFILE${OUTPUT_PREFIX}.bki.$$${OUTPUT_PREFIX}.description.$$${OUTPUT_PREFIX}.shdescription.$$" 0 1 2 3 15
107107

108108

109-
# Get NAMEDATALEN frompostgres_ext.h
109+
# Get NAMEDATALEN frompg_config_manual.h
110110
fordirin$INCLUDE_DIRS;do
111-
if [-f"$dir/postgres_ext.h" ];then
112-
NAMEDATALEN=`grep'^#define[ ]*NAMEDATALEN'$dir/postgres_ext.h|$AWK'{ print $3 }'`
111+
if [-f"$dir/pg_config_manual.h" ];then
112+
NAMEDATALEN=`grep'^#define[ ]*NAMEDATALEN'$dir/pg_config_manual.h|$AWK'{ print $3 }'`
113113
break
114114
fi
115115
done

‎src/include/pg_config_manual.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* for developers.If you edit any of these, be sure to do a *full*
77
* rebuild (and an initdb if noted).
88
*
9-
* $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.23 2006/09/18 22:40:40 tgl Exp $
9+
* $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.24 2007/02/06 09:16:08 petere Exp $
1010
*------------------------------------------------------------------------
1111
*/
1212

@@ -62,6 +62,15 @@
6262
*/
6363
#defineXLOG_SEG_SIZE(16*1024*1024)
6464

65+
/*
66+
* Maximum length for identifiers (e.g. table names, column names,
67+
* function names). It must be a multiple of sizeof(int) (typically
68+
* 4).
69+
*
70+
* Changing this requires an initdb.
71+
*/
72+
#defineNAMEDATALEN 64
73+
6574
/*
6675
* Maximum number of arguments to a function.
6776
*

‎src/include/postgres_ext.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*use header files that are otherwise internal to Postgres to interface
1616
*with the backend.
1717
*
18-
* $PostgreSQL: pgsql/src/include/postgres_ext.h,v 1.16 2004/08/29 05:06:55 momjian Exp $
18+
* $PostgreSQL: pgsql/src/include/postgres_ext.h,v 1.17 2007/02/06 09:16:08 petere Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -38,16 +38,6 @@ typedef unsigned int Oid;
3838
/* you will need to include <limits.h> to use the above #define */
3939

4040

41-
/*
42-
* NAMEDATALEN is the max length for system identifiers (e.g. table names,
43-
* attribute names, function names, etc). It must be a multiple of
44-
* sizeof(int) (typically 4).
45-
*
46-
* NOTE that databases with different NAMEDATALEN's cannot interoperate!
47-
*/
48-
#defineNAMEDATALEN 64
49-
50-
5141
/*
5242
* Identifiers of error message fields. Kept here to keep common
5343
* between frontend and backend, and also to export them to libpq

‎src/tools/msvc/genbki.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
#
1313
# IDENTIFICATION
14-
# $PostgreSQL: pgsql/src/tools/msvc/genbki.pl,v 1.2 2007/01/05 22:20:05 momjian Exp $
14+
# $PostgreSQL: pgsql/src/tools/msvc/genbki.pl,v 1.3 2007/02/06 09:16:08 petere Exp $
1515
#
1616
#-------------------------------------------------------------------------
1717

@@ -24,8 +24,8 @@
2424
$version =~/^(\d+\.\d+)/ ||die"Bad format verison$version\n";
2525
my$majorversion =$1;
2626

27-
my$pgext = read_file("src/include/postgres_ext.h");
28-
$pgext =~/^#define\s+NAMEDATALEN\s+(\d+)$/mg ||die"Could not read NAMEDATALEN frompostgres_ext.h\n";
27+
my$pgext = read_file("src/include/pg_config_manual.h");
28+
$pgext =~/^#define\s+NAMEDATALEN\s+(\d+)$/mg ||die"Could not read NAMEDATALEN frompg_config_manual.h\n";
2929
my$namedatalen =$1;
3030

3131
my$pgauthid = read_file("src/include/catalog/pg_authid.h");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp