提交 2a1bfbce 编写于 作者: P Peter Eisentraut

- Allow array on int8

- Prevent permissions on indexes
- Instituted --enable-multibyte option and tweaked the MB build process where necessary
- initdb prompts for superuser password
上级 a765db40
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.6 1999/12/17 01:05:29 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.7 2000/01/15 18:30:27 petere Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -25,8 +25,8 @@ Postgres documentation ...@@ -25,8 +25,8 @@ Postgres documentation
<synopsis> <synopsis>
initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ] initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
[ --sysid|-i <replaceable class="parameter">sysid</replaceable> ] [ --sysid|-i <replaceable class="parameter">sysid</replaceable> ]
[ --password|-W <replaceable class="parameter">password</replaceable> ] [ --pwprompt|-W ]
[ --pgencoding|-e <replaceable class="parameter">encoding</replaceable> ] [ --encoding|-e <replaceable class="parameter">encoding</replaceable> ]
[ --pglib|-L <replaceable class="parameter">libdir</replaceable> ] [ --pglib|-L <replaceable class="parameter">libdir</replaceable> ]
[ --username|-u <replaceable class="parameter">name</replaceable> ] [ --username|-u <replaceable class="parameter">name</replaceable> ]
[ --noclean | -n ] [ --debug | -d ] [ --template | -t ] [ --noclean | -n ] [ --debug | -d ] [ --template | -t ]
...@@ -71,20 +71,20 @@ initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ] ...@@ -71,20 +71,20 @@ initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--password=<replaceable class="parameter">password</replaceable></term> <term>--pwprompt</term>
<term>-W <replaceable class="parameter">password</replaceable></term> <term>-W</term>
<listitem> <listitem>
<para> <para>
Sets the password of the database superuser. If you don't plan Makes initdb prompt for a password of the database superuser. If you
on using password authentication, this is not important. If you don't plan on using password authentication, this is not important.
do, you can save yourself a trip by specifying it here, but you Otherwise you won't be able to use password authentication until
can always change it later. The default password is empty. you have a password set up.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--pgencoding=<replaceable class="parameter">encoding</replaceable></term> <term>--encoding=<replaceable class="parameter">encoding</replaceable></term>
<term>-e <replaceable class="parameter">encoding</replaceable></term> <term>-e <replaceable class="parameter">encoding</replaceable></term>
<listitem> <listitem>
<para> <para>
...@@ -246,15 +246,6 @@ initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ] ...@@ -246,15 +246,6 @@ initdb [ --pgdata|-D <replaceable class="parameter">dbdir</replaceable> ]
it is a good idea to create the data directory before running <application>initdb</application> it is a good idea to create the data directory before running <application>initdb</application>
<emphasis>and</emphasis> to hand over the ownership of it to the database superuser. <emphasis>and</emphasis> to hand over the ownership of it to the database superuser.
</para> </para>
<para>
Note that if you use the <option>--username</option> you must give correct
information about the name of the <emphasis>current</emphasis> user. If you don't
this will usually manifest itself in an error message about <literal>chmod</literal>
failing on a file <filename>pg_pwd</filename>, because the backend silently
refuses to create it.
</para>
</refsect1> </refsect1>
</refentry> </refentry>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.62 1999/12/13 22:32:15 momjian Exp $ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.63 2000/01/15 18:30:28 petere Exp $
# #
# NOTES # NOTES
# Essentially all Postgres make files include this file and use the # Essentially all Postgres make files include this file and use the
...@@ -158,14 +158,8 @@ X_CFLAGS= @X_CFLAGS@ ...@@ -158,14 +158,8 @@ X_CFLAGS= @X_CFLAGS@
X_LIBS= @X_LIBS@ X_LIBS= @X_LIBS@
X11_LIBS= -lX11 @X_EXTRA_LIBS@ X11_LIBS= -lX11 @X_EXTRA_LIBS@
# # flag whether multibyte is on/off
# enable multi-byte support
# choose one of:
# EUC_JP,EUC_CN,EUC_KR,EUC_TW,UNICODE,MULE_INTERNAL,LATIN1-5
MULTIBYTE=@MULTIBYTE@ MULTIBYTE=@MULTIBYTE@
ifdef MULTIBYTE
MBFLAGS = -DMULTIBYTE=$(MULTIBYTE)
endif
############################################################################## ##############################################################################
# #
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.78 2000/01/14 22:11:35 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.79 2000/01/15 18:30:30 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -359,21 +359,24 @@ ProcessUtility(Node *parsetree, ...@@ -359,21 +359,24 @@ ProcessUtility(Node *parsetree,
aip = stmt->aclitem; aip = stmt->aclitem;
modechg = stmt->modechg; modechg = stmt->modechg;
#ifndef NO_SECURITY
foreach(i, stmt->relNames) foreach(i, stmt->relNames)
{ {
Relation rel;
relname = strVal(lfirst(i)); relname = strVal(lfirst(i));
rel = heap_openr(relname, AccessExclusiveLock);
if (rel && rel->rd_rel->relkind == RELKIND_INDEX)
elog(ERROR, "\"%s\" is an index relation",
relname);
/* close rel, but keep lock until end of xact */
heap_close(rel, NoLock);
#ifndef NO_SECURITY
if (!pg_ownercheck(userName, relname, RELNAME)) if (!pg_ownercheck(userName, relname, RELNAME))
elog(ERROR, "you do not own class \"%s\"", elog(ERROR, "you do not own class \"%s\"",
relname); relname);
}
#endif #endif
foreach(i, stmt->relNames)
{
relname = strVal(lfirst(i));
ChangeAcl(relname, aip, modechg); ChangeAcl(relname, aip, modechg);
} }
} }
break; break;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.15 1999/12/18 02:48:53 momjian Exp $ # $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.16 2000/01/15 18:30:31 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,7 +17,7 @@ include ../../Makefile.global ...@@ -17,7 +17,7 @@ include ../../Makefile.global
all: initdb all: initdb
initdb: initdb.sh initdb: initdb.sh
sed -e 's/__MULTIBYTE__/$(MULTIBYTE)/' initdb.sh > initdb sed -e 's/__MULTIBYTE__/$(MULTIBYTE)/g' < initdb.sh > initdb
install: initdb install: initdb
$(INSTALL) $(INSTL_EXE_OPTS) $+ $(BINDIR) $(INSTALL) $(INSTL_EXE_OPTS) $+ $(BINDIR)
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.78 2000/01/13 18:22:10 petere Exp $ # $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.79 2000/01/15 18:30:31 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
exit_nicely(){ exit_nicely(){
stty echo >& /dev/null
echo echo
echo "$CMDNAME failed." echo "$CMDNAME failed."
if [ "$noclean" -eq 0 ]; then if [ "$noclean" -eq 0 ]; then
...@@ -60,6 +61,18 @@ else ...@@ -60,6 +61,18 @@ else
TEMPFILE="/tmp/initdb.$$" TEMPFILE="/tmp/initdb.$$"
fi fi
# Check for echo -n vs echo \c
if echo '\c' | grep -s c >/dev/null 2>&1
then
ECHO_N="echo -n"
ECHO_C=""
else
ECHO_N="echo"
ECHO_C='\c'
fi
# #
# Find out where we're located # Find out where we're located
# #
...@@ -98,7 +111,7 @@ done ...@@ -98,7 +111,7 @@ done
# 0 is the default (non-)encoding # 0 is the default (non-)encoding
MULTIBYTEID=0 MULTIBYTEID=0
# This is placed here by configure --with-mb=XXX. # This is placed here by configure --enable-multibyte[=XXX].
MULTIBYTE=__MULTIBYTE__ MULTIBYTE=__MULTIBYTE__
# Set defaults: # Set defaults:
...@@ -118,8 +131,6 @@ template_only=0 ...@@ -118,8 +131,6 @@ template_only=0
POSTGRES_SUPERUSERNAME="$EffectiveUser" POSTGRES_SUPERUSERNAME="$EffectiveUser"
POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`" POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`"
Password='_null_'
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
case "$1" in case "$1" in
...@@ -160,14 +171,9 @@ do ...@@ -160,14 +171,9 @@ do
POSTGRES_SUPERUSERID=`echo $1 | sed 's/^-i//'` POSTGRES_SUPERUSERID=`echo $1 | sed 's/^-i//'`
;; ;;
# The default password of the database superuser. # The default password of the database superuser.
--password|-W) # Make initdb prompt for the default password of the database superuser.
Password="$2" --pwprompt|-W)
shift;; PwPrompt=1
--password=*)
Password=`echo $1 | sed 's/^--password=//'`
;;
-W*)
Password=`echo $1 | sed 's/^-W//'`
;; ;;
# Directory where to install the data. No default, unless the environment # Directory where to install the data. No default, unless the environment
# variable PGDATA is set. # variable PGDATA is set.
...@@ -193,43 +199,43 @@ do ...@@ -193,43 +199,43 @@ do
;; ;;
# The encoding of the template1 database. Defaults to what you chose # The encoding of the template1 database. Defaults to what you chose
# at configure time. (see above) # at configure time. (see above)
--pgencoding|-e) --encoding|-e)
MULTIBYTE="$2" MULTIBYTE="$2"
shift;; shift;;
--pgencoding=*) --encoding=*)
MULTIBYTE=`echo $1 | sed 's/^--pgencoding=//'` MULTIBYTE=`echo $1 | sed 's/^--encoding=//'`
;; ;;
-e*) -e*)
MULTIBYTE=`echo $1 | sed 's/^-e//'` MULTIBYTE=`echo $1 | sed 's/^-e//'`
;; ;;
*) *)
echo "Unrecognized option '$1'. Try -? for help." PGDATA=$1
exit 1
;; ;;
esac esac
shift shift
done done
if [ "$usage" ] if [ "$usage" ]; then
then echo "initdb initialized a PostgreSQL database."
echo "" echo
echo "Usage: $CMDNAME [options]" echo "Usage:"
echo "" echo " $CMDNAME [options] datadir"
echo " -t, --template " echo
echo " -d, --debug " echo "Options:"
echo " -n, --noclean " echo " [-D, --pgdata] <datadir> Location for this database"
echo " -i SYSID, --sysid=SYSID " echo " -W, --pwprompt Prompt for a password for the new superuser's"
echo " -W PASSWORD, --password=PASSWORD "
echo " -u SUPERUSER, --username=SUPERUSER "
echo " -D DATADIR, --pgdata=DATADIR "
echo " -L LIBDIR, --pglib=LIBDIR "
if [ -n "$MULTIBYTE" ] if [ -n "$MULTIBYTE" ]
then then
echo " -e ENCODING, --pgencoding=ENCODING" echo " -e, --encoding <encoding> Set the default multibyte encoding for new databases"
fi fi
echo " -?, --help " echo " -i, --sysid <sysid> Database sysid for the superuser"
echo "" echo "Less commonly used options: "
echo " -L, --pglib <libdir> Where to find the input files (should happend automatically"
echo " -t, --template Re-initialize template database only"
echo " -d, --debug Generate lots of debugging output"
echo " -n, --noclean Do not clean up after errors"
echo
echo "Report bugs to <bugs@postgresql.org>."
exit 0 exit 0
fi fi
...@@ -239,17 +245,18 @@ fi ...@@ -239,17 +245,18 @@ fi
if [ "$MULTIBYTE" ] if [ "$MULTIBYTE" ]
then then
MULTIBYTEID=`$PGPATH/pg_encoding $MULTIBYTE` MULTIBYTEID=`$PGPATH/pg_encoding $MULTIBYTE 2> /dev/null`
if [ "$?" -ne 0 ] if [ "$?" -ne 0 ]
then then
echo "The program pg_encoding failed. Perhaps you did not configure" echo "$CMDNAME: pg_encoding failed"
echo "PostgreSQL for multibyte support or the program was not success-" echo
echo "fully installed." echo "Perhaps you did not configure PostgreSQL for multibyte support or"
echo "the program was not successfully installed."
exit 1 exit 1
fi fi
if [ -z "$MULTIBYTEID" ] if [ -z "$MULTIBYTEID" ]
then then
echo "$CMDNAME: $MULTIBYTE is not a valid encoding name." echo "$CMDNAME: $MULTIBYTE is not a valid encoding name"
exit 1 exit 1
fi fi
fi fi
...@@ -273,7 +280,7 @@ fi ...@@ -273,7 +280,7 @@ fi
if ! echo "$PGDATA" | grep '^/' > /dev/null 2>&1 if ! echo "$PGDATA" | grep '^/' > /dev/null 2>&1
then then
echo "$CMDNAME: The data path must be specified as an absolute path." echo "$CMDNAME: data path must be specified as an absolute path"
exit 1 exit 1
fi fi
...@@ -284,8 +291,7 @@ fi ...@@ -284,8 +291,7 @@ fi
# This means they have neither 'id' nor 'whoami'! # This means they have neither 'id' nor 'whoami'!
if [ -z "$POSTGRES_SUPERUSERNAME" ] if [ -z "$POSTGRES_SUPERUSERNAME" ]
then then
echo "$CMDNAME: Could not determine what the name of the database" echo "$CMDNAME: Could not the determine current username. Please use the -u option."
echo "superuser should be. Please use the --username option."
exit 1 exit 1
fi fi
...@@ -431,7 +437,6 @@ then ...@@ -431,7 +437,6 @@ then
cat "$GLOBAL" \ cat "$GLOBAL" \
| sed -e "s/POSTGRES/$POSTGRES_SUPERUSERNAME/g" \ | sed -e "s/POSTGRES/$POSTGRES_SUPERUSERNAME/g" \
-e "s/PGUID/$POSTGRES_SUPERUSERID/g" \ -e "s/PGUID/$POSTGRES_SUPERUSERID/g" \
-e "s/PASSWORD/$Password/g" \
| "$PGPATH"/postgres $BACKENDARGS template1 \ | "$PGPATH"/postgres $BACKENDARGS template1 \
|| exit_nicely || exit_nicely
...@@ -470,17 +475,35 @@ echo "CREATE TRIGGER pg_sync_pg_pwd AFTER INSERT OR UPDATE OR DELETE ON pg_shado ...@@ -470,17 +475,35 @@ echo "CREATE TRIGGER pg_sync_pg_pwd AFTER INSERT OR UPDATE OR DELETE ON pg_shado
"FOR EACH ROW EXECUTE PROCEDURE update_pg_pwd()" \ "FOR EACH ROW EXECUTE PROCEDURE update_pg_pwd()" \
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
# Create the initial pg_pwd (flat-file copy of pg_shadow) # needs to be done before alter user
echo "Writing password file." echo "REVOKE ALL on pg_shadow FROM public" \
echo "COPY pg_shadow TO '$PGDATA/pg_pwd' USING DELIMITERS '\\t'" \
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
# An ordinary COPY will leave the file too loosely protected. # set up password
# Note: If you lied above and specified a --username different from the one if [ "$PwPrompt" ]; then
# you really are, this will manifest itself in this command failing because $ECHO_N "Enter new superuser password: "$ECHO_C
# of a missing file, since the COPY command above failed. It would perhaps stty -echo >& /dev/null
# be better if postgres returned an error code. read FirstPw
chmod go-rw "$PGDATA"/pg_pwd || exit_nicely stty echo >& /dev/null
echo
$ECHO_N "Enter it again: "$ECHO_C
stty -echo >& /dev/null
read SecondPw
stty echo >& /dev/null
echo
if [ "$FirstPw" != "$SecondPw" ]; then
echo "Passwords didn't match."
exit_nicely
fi
echo "ALTER USER \"$POSTGRES_SUPERUSERNAME\" WITH PASSWORD '$FirstPw'" \
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
if [ ! -f $PGDATA/pg_pwd ]; then
echo "The password file wasn't generated. Please report this problem."
exit_nicely
fi
echo "Setting password"
fi
echo "Creating view pg_user." echo "Creating view pg_user."
echo "CREATE VIEW pg_user AS \ echo "CREATE VIEW pg_user AS \
...@@ -496,9 +519,6 @@ echo "CREATE VIEW pg_user AS \ ...@@ -496,9 +519,6 @@ echo "CREATE VIEW pg_user AS \
FROM pg_shadow" \ FROM pg_shadow" \
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
echo "REVOKE ALL on pg_shadow FROM public" \
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
echo "Creating view pg_rules." echo "Creating view pg_rules."
echo "CREATE VIEW pg_rules AS \ echo "CREATE VIEW pg_rules AS \
SELECT \ SELECT \
...@@ -569,9 +589,9 @@ echo "VACUUM ANALYZE" \ ...@@ -569,9 +589,9 @@ echo "VACUUM ANALYZE" \
echo echo
echo "$CMDNAME completed successfully. You can now start the database server." echo "$CMDNAME completed successfully. You can now start the database server."
echo "($PGPATH/postmaster -D $PGDATA)" echo " $PGPATH/postmaster -D $PGDATA"
echo "or" echo "or"
echo "($PGPATH/pg_ctl -D $PGDATA start)" echo " $PGPATH/pg_ctl -D $PGDATA start"
echo echo
exit 0 exit 0
...@@ -6,21 +6,28 @@ ...@@ -6,21 +6,28 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.3 1999/06/05 10:27:31 ishii Exp $ # $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.4 2000/01/15 18:30:32 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
SRCDIR= ../.. SRCDIR= ../..
include ../../Makefile.global include ../../Makefile.global
# This is a bit of hackery here: pg_encoding uses backend includes and the
# frontend library.
OBJS= pg_encoding.o OBJS= pg_encoding.o
CFLAGS:= -I$(SRCDIR)/include $(CFLAGS)
all: submake pg_encoding
CFLAGS+= $(MBFLAGS) -I$(SRCDIR)/include pg_encoding: $(OBJS)
$(CC) -o pg_encoding $(OBJS) -L$(LIBPQDIR) -lpq $(LDFLAGS) $(CFLAGS)
all: pg_encoding .PHONY: submake
pg_encoding: $(OBJS) $(LIBPQDIR)/libpq.a submake:
$(CC) -o pg_encoding $(OBJS) -L$(LIBPQDIR) -lpq $(LDFLAGS) $(MAKE) -C $(LIBPQDIR) libpq.a
install: pg_encoding install: pg_encoding
$(INSTALL) $(INSTL_EXE_OPTS) pg_encoding$(X) $(BINDIR)/pg_encoding$(X) $(INSTALL) $(INSTL_EXE_OPTS) pg_encoding$(X) $(BINDIR)/pg_encoding$(X)
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/pg_encoding.c,v 1.5 1999/12/16 20:10:00 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/pg_encoding.c,v 1.6 2000/01/15 18:30:32 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "c.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
static void usage(void); static void usage(void);
......
此差异已折叠。
...@@ -214,7 +214,7 @@ dnl We have read the default value of USE_LOCALE from the template ...@@ -214,7 +214,7 @@ dnl We have read the default value of USE_LOCALE from the template
dnl file. We have a further option of using dnl file. We have a further option of using
dnl --enable-locale to explicitly enable it dnl --enable-locale to explicitly enable it
dnl It defaults to disabled dnl It defaults to disabled
AC_MSG_CHECKING(setting USE_LOCALE) AC_MSG_CHECKING(whether to support locale)
AC_ARG_ENABLE( AC_ARG_ENABLE(
locale, locale,
[ --enable-locale enable locale support ], [ --enable-locale enable locale support ],
...@@ -225,7 +225,7 @@ AC_ARG_ENABLE( ...@@ -225,7 +225,7 @@ AC_ARG_ENABLE(
dnl We exclude cyrillic recode support unless we override it with dnl We exclude cyrillic recode support unless we override it with
dnl --enable-recode to explicitly enable it dnl --enable-recode to explicitly enable it
dnl It defaults to disabled dnl It defaults to disabled
AC_MSG_CHECKING(setting CYR_RECODE) AC_MSG_CHECKING(whether to support cyrillic recode)
AC_ARG_ENABLE( AC_ARG_ENABLE(
recode, recode,
[ --enable-recode enable cyrillic recode support ], [ --enable-recode enable cyrillic recode support ],
...@@ -233,23 +233,36 @@ AC_ARG_ENABLE( ...@@ -233,23 +233,36 @@ AC_ARG_ENABLE(
AC_MSG_RESULT(disabled) AC_MSG_RESULT(disabled)
) )
AC_MSG_CHECKING(setting MULTIBYTE) dnl Multibyte support
AC_ARG_WITH(mb,
[ --with-mb=<encoding> enable multi-byte support ], AC_MSG_CHECKING(whether to support multibyte)
AC_ARG_ENABLE(multibyte,
[ --enable-multibyte enable multibyte character support ],
[ [
case "$withval" in MULTIBYTE=SQL_ASCII
SQL_ASCII|EUC_JP|EUC_CN|EUC_KR|EUC_TW|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5|KOI8|WIN|ALT) if test "$enableval" != "yes"; then
AC_MSG_RESULT("enabled with $withval") case "$enableval" in
;; SQL_ASCII|EUC_JP|EUC_CN|EUC_KR|EUC_TW|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5|KOI8|WIN|ALT|SJIS|BIG5|WIN1250)
*) # ok
AC_MSG_ERROR([*** You must supply an argument to the --with-mb option one of SQL_ASCII,EUC_JP,EUC_CN,EUC_KR,EUC_TW,UNICODE,MULE_INTERNAL,LATIN1-5,KOI8,WIN,ALT]) ;;
;; *)
esac AC_MSG_ERROR(
MULTIBYTE="$withval" [Argument to --enable-multibyte must be one of:
SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW,
UNICODE, MULE_INTERNAL,
LATIN1, LATIN2, LATIN3, LATIN4, LATIN5,
KOI8, WIN, ALT, SJIS, BIG5, WIN1250
Or do not specify an argument to the option to use the default.])
esac
MULTIBYTE=$enableval
fi
AC_DEFINE(MULTIBYTE)
AC_MSG_RESULT(enabled)
], ],
AC_MSG_RESULT("disabled") AC_MSG_RESULT("disabled")
) )
dnl We use the default value of 5432 for the DEF_PGPORT value. If dnl We use the default value of 5432 for the DEF_PGPORT value. If
dnl we over-ride it with --with-pgport=port then we bypass this piece dnl we over-ride it with --with-pgport=port then we bypass this piece
AC_MSG_CHECKING(setting DEF_PGPORT) AC_MSG_CHECKING(setting DEF_PGPORT)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_shadow.h,v 1.5 1999/12/17 01:05:31 momjian Exp $ * $Id: pg_shadow.h,v 1.6 2000/01/15 18:30:34 petere Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -72,6 +72,6 @@ typedef FormData_pg_shadow *Form_pg_shadow; ...@@ -72,6 +72,6 @@ typedef FormData_pg_shadow *Form_pg_shadow;
* user choices. * user choices.
* ---------------- * ----------------
*/ */
DATA(insert OID = 0 ( POSTGRES PGUID t t t t PASSWORD _null_ )); DATA(insert OID = 0 ( POSTGRES PGUID t t t t _null_ _null_ ));
#endif /* PG_SHADOW_H */ #endif /* PG_SHADOW_H */
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_type.h,v 1.75 2000/01/11 04:02:28 tgl Exp $ * $Id: pg_type.h,v 1.76 2000/01/15 18:30:34 petere Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -328,6 +328,7 @@ DATA(insert OID = 1012 ( _cid PGUID -1 -1 f b t \054 0 29 array_in array_out ...@@ -328,6 +328,7 @@ DATA(insert OID = 1012 ( _cid PGUID -1 -1 f b t \054 0 29 array_in array_out
DATA(insert OID = 1013 ( _oidvector PGUID -1 -1 f b t \054 0 30 array_in array_out array_in array_out i _null_ )); DATA(insert OID = 1013 ( _oidvector PGUID -1 -1 f b t \054 0 30 array_in array_out array_in array_out i _null_ ));
DATA(insert OID = 1014 ( _bpchar PGUID -1 -1 f b t \054 0 1042 array_in array_out array_in array_out i _null_ )); DATA(insert OID = 1014 ( _bpchar PGUID -1 -1 f b t \054 0 1042 array_in array_out array_in array_out i _null_ ));
DATA(insert OID = 1015 ( _varchar PGUID -1 -1 f b t \054 0 1043 array_in array_out array_in array_out i _null_ )); DATA(insert OID = 1015 ( _varchar PGUID -1 -1 f b t \054 0 1043 array_in array_out array_in array_out i _null_ ));
DATA(insert OID = 1016 ( _int8 PGUID -1 -1 f b t \054 0 20 array_in array_out array_in array_out d _null_ ));
DATA(insert OID = 1017 ( _point PGUID -1 -1 f b t \054 0 600 array_in array_out array_in array_out d _null_ )); DATA(insert OID = 1017 ( _point PGUID -1 -1 f b t \054 0 600 array_in array_out array_in array_out d _null_ ));
DATA(insert OID = 1018 ( _lseg PGUID -1 -1 f b t \054 0 601 array_in array_out array_in array_out d _null_ )); DATA(insert OID = 1018 ( _lseg PGUID -1 -1 f b t \054 0 601 array_in array_out array_in array_out d _null_ ));
DATA(insert OID = 1019 ( _path PGUID -1 -1 f b t \054 0 602 array_in array_out array_in array_out d _null_ )); DATA(insert OID = 1019 ( _path PGUID -1 -1 f b t \054 0 602 array_in array_out array_in array_out d _null_ ));
......
...@@ -61,6 +61,9 @@ ...@@ -61,6 +61,9 @@
/* Set to 1 if you want CYR_RECODE (cyrillic recode) */ /* Set to 1 if you want CYR_RECODE (cyrillic recode) */
#undef CYR_RECODE #undef CYR_RECODE
/* Set to 1 if you want to use multibyte characters */
#undef MULTIBYTE
/* Set to 1 if you want to Enable ASSERT CHECKING */ /* Set to 1 if you want to Enable ASSERT CHECKING */
#undef USE_ASSERT_CHECKING #undef USE_ASSERT_CHECKING
......
/* $Id: pg_wchar.h,v 1.11 1999/07/17 16:25:28 momjian Exp $ */ /* $Id: pg_wchar.h,v 1.12 2000/01/15 18:30:35 petere Exp $ */
#ifndef PG_WCHAR_H #ifndef PG_WCHAR_H
#define PG_WCHAR_H #define PG_WCHAR_H
#include "postgres.h"
#include <sys/types.h> #include <sys/types.h>
#include "c.h"
#define SQL_ASCII 0 /* SQL/ASCII */ #define SQL_ASCII 0 /* SQL/ASCII */
#define EUC_JP 1 /* EUC for Japanese */ #define EUC_JP 1 /* EUC for Japanese */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册