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

Commit97f7cea

Browse files
committed
Guard against empty-string results from pg_getlocale.
1 parentf0811a7 commit97f7cea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/bin/initdb/initdb.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
2828
# Portions Copyright (c) 1994, Regents of the University of California
2929
#
30-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.153 2002/05/09 13:30:24 petere Exp $
30+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.154 2002/05/17 02:20:26 tgl Exp $
3131
#
3232
#-------------------------------------------------------------------------
3333

@@ -466,11 +466,11 @@ echo
466466

467467
TAB=''
468468

469-
iftest`pg_getlocale CTYPE` =`pg_getlocale COLLATE` \
470-
&&test`pg_getlocale CTYPE` =`pg_getlocale TIME` \
471-
&&test`pg_getlocale CTYPE` =`pg_getlocale NUMERIC` \
472-
&&test`pg_getlocale CTYPE` =`pg_getlocale MONETARY` \
473-
&&test`pg_getlocale CTYPE` =`pg_getlocale MESSAGES`
469+
iftestx`pg_getlocale CTYPE` =x`pg_getlocale COLLATE` \
470+
&&testx`pg_getlocale CTYPE` =x`pg_getlocale TIME` \
471+
&&testx`pg_getlocale CTYPE` =x`pg_getlocale NUMERIC` \
472+
&&testx`pg_getlocale CTYPE` =x`pg_getlocale MONETARY` \
473+
&&testx`pg_getlocale CTYPE` =x`pg_getlocale MESSAGES`
474474
then
475475
echo"The database cluster will be initialized with locale`pg_getlocale CTYPE`."
476476
else
@@ -480,7 +480,7 @@ else
480480
fi
481481

482482
# (Be sure to maintain the correspondence with locale_is_like_safe() in selfuncs.c.)
483-
iftest`pg_getlocale COLLATE`!=C&&test`pg_getlocale COLLATE`!=POSIX;then
483+
iftestx`pg_getlocale COLLATE`!=xC&&testx`pg_getlocale COLLATE`!=xPOSIX;then
484484
echo"This locale setting will prevent the use of indexes for pattern matching"
485485
echo"operations. If that is a concern, rerun$CMDNAME with the collation order"
486486
echo"set to\"C\". For more information see the Administrator's Guide."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp