Skip to content
Snippets Groups Projects
Commit 5c99f9cd authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Fix MULTIBYTE handling in string by using strcat.

parent 219652d5
No related branches found
No related tags found
No related merge requests found
No preview for this file type
This diff is collapsed.
This diff is collapsed.
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
# #
# #
# IDENTIFICATION # 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 ...@@ -202,15 +202,27 @@ do
shift shift
done done
if [ "$usage" ]; then if [ "$usage" ]; then
echo "$CMDNAME [-t|--template] [-d|--debug] [-n|--noclean] \\" echo ""
echo " [-u|--username SUPERUSER] [-D|--pgdata DATADIR] \\" echo "Usage: $CMDNAME [options]"
echo " [-L|--pglib=LIBDIR] [-e|--pgencoding=ENCODING]" echo ""
exit 0 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 fi
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# Resolve the multibyte encoding name # Resolve the multibyte encoding name
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
......
...@@ -317,11 +317,11 @@ listAllDbs(PsqlSettings *pset, bool desc) ...@@ -317,11 +317,11 @@ listAllDbs(PsqlSettings *pset, bool desc)
strcpy(buf, strcpy(buf,
"SELECT pg_database.datname as \"Database\",\n" "SELECT pg_database.datname as \"Database\",\n"
" pg_user.usename as \"Owner\"" " pg_user.usename as \"Owner\"");
#ifdef MULTIBYTE #ifdef MULTIBYTE
",\n pg_database.encoding as \"Encoding\"" strcat(buf,
",\n pg_database.encoding as \"Encoding\"");
#endif #endif
);
if (desc) if (desc)
strcat(buf, ",\n obj_description(pg_database.oid) as \"Description\"\n"); strcat(buf, ",\n obj_description(pg_database.oid) as \"Description\"\n");
strcat(buf, "FROM pg_database, pg_user\n" strcat(buf, "FROM pg_database, pg_user\n"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# #
# #
# IDENTIFICATION # 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 ...@@ -133,10 +133,10 @@ if [ "$usage" ]; then
echo " -h HOSTNAME, --host=HOSTNAME " echo " -h HOSTNAME, --host=HOSTNAME "
echo " -p PORT, --port=PORT " echo " -p PORT, --port=PORT "
echo " -U USERNAME, --username=USERNAME " echo " -U USERNAME, --username=USERNAME "
echo " -l, --list "
echo " -W, --password " echo " -W, --password "
echo " -d DBNAME, --database=DBNAME " echo " -d DBNAME, --database=DBNAME "
echo " -e, --echo " echo " -e, --echo "
echo " -q, --quiet "
echo " -D PATH, --location=PATH " echo " -D PATH, --location=PATH "
echo " -L PGLIB --pglib=PGLIB " echo " -L PGLIB --pglib=PGLIB "
echo " -?, --help " echo " -?, --help "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment