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

Commitc252c97

Browse files
committed
Add checking for valid database encoding.
1 parent12ceb11 commitc252c97

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

‎src/bin/initdb/initdb.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
2424
# Portions Copyright (c) 1994, Regents of the University of California
2525
#
26-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.122 2001/03/13 21:37:15 petere Exp $
26+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.123 2001/03/27 05:45:50 ishii Exp $
2727
#
2828
#-------------------------------------------------------------------------
2929

@@ -311,6 +311,10 @@ then
311311
then
312312
echo"$CMDNAME:$MULTIBYTE is not a valid encoding name"1>&2
313313
exit 1
314+
elif [$MULTIBYTEID-gt 31 ]
315+
then
316+
echo"$CMDNAME:$MULTIBYTE cannot be used as a database encoding"1>&2
317+
exit 1
314318
fi
315319
fi
316320

‎src/bin/scripts/createdb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#
1313
#
1414
# IDENTIFICATION
15-
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.14 2001/02/18 17:53:54 tgl Exp $
15+
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.15 2001/03/27 05:47:13 ishii Exp $
1616
#
1717
#-------------------------------------------------------------------------
1818

@@ -145,6 +145,10 @@ then
145145
then
146146
echo"$CMDNAME:\"$MB\" is not a valid encoding name"1>&2
147147
exit 1
148+
elif [$mbcode-gt 31 ]
149+
then
150+
echo"$CMDNAME:$MB cannot be used as a database encoding"1>&2
151+
exit 1
148152
fi
149153
fi
150154

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp