diff options
author | Bruce Momjian | 2007-03-29 22:46:42 +0000 |
---|---|---|
committer | Bruce Momjian | 2007-03-29 22:46:42 +0000 |
commit | 452427d0fdc49aeb74711eabe0c6d9554d406089 (patch) | |
tree | e1496e4910f397f26b59e683d9fa27f0d0b90d47 | |
parent | 31f0bacb44b695878a83297c058889d3747a1424 (diff) |
pg_char_to_encoding() was redundant in initdb because
pg_valid_server_encoding() returns the same result if the encoding is
valid.
ITAGAKI Takahiro
-rw-r--r-- | src/bin/initdb/initdb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 3d00d1eb68d..2be097a0b9e 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -42,7 +42,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * Portions taken from FreeBSD. * - * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.135 2007/03/18 16:50:43 neilc Exp $ + * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.136 2007/03/29 22:46:42 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -709,8 +709,7 @@ get_encoding_id(char *encoding_name) if (encoding_name && *encoding_name) { - if ((enc = pg_char_to_encoding(encoding_name)) >= 0 && - pg_valid_server_encoding(encoding_name) >= 0) + if ((enc = pg_valid_server_encoding(encoding_name)) >= 0) return encodingid_to_string(enc); } fprintf(stderr, _("%s: \"%s\" is not a valid server encoding name\n"), |