8000 Fix MULTIBYTE handling in string by using strcat. · postgrespro/postgres_cluster@5c99f9c · GitHub
[go: up one dir, main page]

Skip to content

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

Appearance settings

Commit 5c99f9c

Browse files
committed
Fix MULTIBYTE handling in string by using strcat.
1 parent 219652d commit 5c99f9c

File tree

6 files changed

+2840
-290
lines changed

6 files changed

+2840
-290
lines changed

src/backend/port/dynloader/ID

42.8 KB
Binary file not shown.

src/backend/port/dynloader/tags

Lines changed: 1408 additions & 139 deletions
Large diffs are not rendered by default.

src/backend/port/qnx4/tags

Lines changed: 1408 additions & 139 deletions
Large diffs are not rendered by default.

src/bin/initdb/initdb.sh

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
#
2828
# IDENTIFICATION
29-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.69 1999/12/17 16:53:11 wieck Exp $
29+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.70 1999/12/17 18:05:30 momjian Exp $
3030
#
3131
#-------------------------------------------------------------------------
3232

@@ -202,15 +202,27 @@ do
202202
shift
203203
done
204204

205-
206205
if [ "$usage" ]; then
207-
echo "$CMDNAME [-t|--template] [-d|--debug] [-n|--noclean] \\"
208-
echo " [-u|--username SUPERUSER] [-D|--pgdata DATADIR] \\"
209-
echo " [-L|--pglib=LIBDIR] [-e|--pgencoding=ENCODING]"
210-
exit 0
206+
echo ""
207+
echo "Usage: $CMDNAME [options]"
208+
echo ""
209+
echo " -t, --template "
210+
echo " -d, --debug "
211+
echo " -n, --noclean "
212+
echo " -i SYSID, --sysid=SYSID "
213+
echo " -W PASSWORD, --password=PASSWORD "
214+
echo " -u SUPERUSER, --username=SUPERUSER "
215+
echo " -D DATADIR, --pgdata=DATADIR "
216+
echo " -L LIBDIR, --pglib=LIBDIR "
217+
218+
if [ -n "$MULTIBYTE" ]; then
219+
echo " -e ENCODING, --pgencoding=ENCODING"
220+
fi
221+
echo " -?, --help "
222+
echo ""
223+
exit 0
211224
fi
212225

213-
214226
#-------------------------------------------------------------------------
215227
# Resolve the multibyte encoding name
216228
#-------------------------------------------------------------------------

src/bin/psql/describe.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,11 @@ listAllDbs(PsqlSettings *pset, bool desc)
317317

318318
strcpy(buf,
319319
"SELECT pg_database.datname as \"Database\",\n"
320-
" pg_user.usename as \"Owner\""
320+
" pg_user.usename as \"Owner\"");
321321
#ifdef MULTIBYTE
322-
",\n pg_database.encoding as \"Encoding\""
322+
strcat(buf,
323+
",\n pg_database.encoding as \"Encoding\"");
323324
#endif
324-
);
325325
if (desc)
326326
strcat(buf, ",\n obj_description(pg_database.oid) as \"Description\"\n");
327327
strcat(buf, "FROM pg_database, pg_user\n"

src/bin/scripts/createlang.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
#
1010
# IDENTIFICATION
11-
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.3 1999/12/16 20:10:02 momjian Exp $
11+
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.4 1999/12/17 18:05:32 momjian Exp $
1212
#
1313
#-------------------------------------------------------------------------
1414

@@ -133,10 +133,10 @@ if [ "$usage" ]; then
133133
echo " -h HOSTNAME, --host=HOSTNAME "
134134
echo " -p PORT, --port=PORT "
135135
echo " -U USERNAME, --username=USERNAME "
136+
echo " -l, --list "
136137
echo " -W, --password "
137138
echo " -d DBNAME, --database=DBNAME "
138139
echo " -e, --echo "
139-
echo " -q, --quiet "
140140
echo " -D PATH, --location=PATH "
141141
echo " -L PGLIB --pglib=PGLIB "
142142
echo " -?, --help "

0 commit comments

Comments
 (0)
0