Fix MULTIBYTE handling in string by using strcat.

This commit is contained in:
Bruce Momjian 1999-12-17 18:05:32 +00:00
parent 219652d5f7
commit 5c99f9cd84
6 changed files with 2840 additions and 290 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.69 1999/12/17 16:53:11 wieck Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.70 1999/12/17 18:05:30 momjian Exp $
#
#-------------------------------------------------------------------------
@ -202,15 +202,27 @@ do
shift
done
if [ "$usage" ]; then
echo "$CMDNAME [-t|--template] [-d|--debug] [-n|--noclean] \\"
echo " [-u|--username SUPERUSER] [-D|--pgdata DATADIR] \\"
echo " [-L|--pglib=LIBDIR] [-e|--pgencoding=ENCODING]"
exit 0
echo ""
echo "Usage: $CMDNAME [options]"
echo ""
echo " -t, --template "
echo " -d, --debug "
echo " -n, --noclean "
echo " -i SYSID, --sysid=SYSID "
echo " -W PASSWORD, --password=PASSWORD "
echo " -u SUPERUSER, --username=SUPERUSER "
echo " -D DATADIR, --pgdata=DATADIR "
echo " -L LIBDIR, --pglib=LIBDIR "
if [ -n "$MULTIBYTE" ]; then
echo " -e ENCODING, --pgencoding=ENCODING"
fi
echo " -?, --help "
echo ""
exit 0
fi
#-------------------------------------------------------------------------
# Resolve the multibyte encoding name
#-------------------------------------------------------------------------

View File

@ -317,11 +317,11 @@ listAllDbs(PsqlSettings *pset, bool desc)
strcpy(buf,
"SELECT pg_database.datname as \"Database\",\n"
" pg_user.usename as \"Owner\""
" pg_user.usename as \"Owner\"");
#ifdef MULTIBYTE
",\n pg_database.encoding as \"Encoding\""
strcat(buf,
",\n pg_database.encoding as \"Encoding\"");
#endif
);
if (desc)
strcat(buf, ",\n obj_description(pg_database.oid) as \"Description\"\n");
strcat(buf, "FROM pg_database, pg_user\n"

View File

@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.3 1999/12/16 20:10:02 momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.4 1999/12/17 18:05:32 momjian Exp $
#
#-------------------------------------------------------------------------
@ -133,10 +133,10 @@ if [ "$usage" ]; then
echo " -h HOSTNAME, --host=HOSTNAME "
echo " -p PORT, --port=PORT "
echo " -U USERNAME, --username=USERNAME "
echo " -l, --list "
echo " -W, --password "
echo " -d DBNAME, --database=DBNAME "
echo " -e, --echo "
echo " -q, --quiet "
echo " -D PATH, --location=PATH "
echo " -L PGLIB --pglib=PGLIB "
echo " -?, --help "