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

Commit452427d

Browse files
committed
pg_char_to_encoding() was redundant in initdb because
pg_valid_server_encoding() returns the same result if the encoding isvalid.ITAGAKI Takahiro
1 parent31f0bac commit452427d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* Portions Copyright (c) 1994, Regents of the University of California
4343
* Portions taken from FreeBSD.
4444
*
45-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.135 2007/03/18 16:50:43 neilc Exp $
45+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.136 2007/03/29 22:46:42 momjian Exp $
4646
*
4747
*-------------------------------------------------------------------------
4848
*/
@@ -709,8 +709,7 @@ get_encoding_id(char *encoding_name)
709709

710710
if (encoding_name&&*encoding_name)
711711
{
712-
if ((enc=pg_char_to_encoding(encoding_name)) >=0&&
713-
pg_valid_server_encoding(encoding_name) >=0)
712+
if ((enc=pg_valid_server_encoding(encoding_name)) >=0)
714713
returnencodingid_to_string(enc);
715714
}
716715
fprintf(stderr,_("%s: \"%s\" is not a valid server encoding name\n"),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp