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

Commit5bfaf50

Browse files
peterepull[bot]
authored andcommitted
Make locale option behavior more consistent
Locale options can be specified for initdb, createdb, and CREATEDATABASE. In initdb, it has always been possible to specify --localeand then some --lc-* option to override a category. CREATE DATABASEand createdb didn't allow that, requiring either the all-categoriesoption or only per-category options. Inf2553d4, this was changed in CREATEDATABASE (perhaps by accident?) to be more like the initdb behavior,but createdb still had the old behavior.Now we change createdb to match the behavior of CREATE DATABASE andinitdb, and also update the documentation of CREATE DATABASE to matchthe new behavior, which was not done in the above commit.Author: Marina Polyakova <m.polyakova@postgrespro.ru>Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>Discussion:https://www.postgresql.org/message-id/7c99c132dc9c0ac630e0127f032ac480@postgrespro.ru
1 parent7bb8864 commit5bfaf50

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

‎doc/src/sgml/ref/create_database.sgml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
145145
<listitem>
146146
<para>
147147
This is a shortcut for setting <symbol>LC_COLLATE</symbol>
148-
and <symbol>LC_CTYPE</symbol> at once. If you specify this,
149-
you cannot specify either of those parameters.
148+
and <symbol>LC_CTYPE</symbol> at once.
150149
</para>
151150
<tip>
152151
<para>

‎src/bin/scripts/createdb.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,10 @@ main(int argc, char *argv[])
161161

162162
if (locale)
163163
{
164-
if (lc_ctype)
165-
pg_fatal("only one of --locale and --lc-ctype can be specified");
166-
if (lc_collate)
167-
pg_fatal("only one of --locale and --lc-collate can be specified");
168-
lc_ctype=locale;
169-
lc_collate=locale;
164+
if (!lc_ctype)
165+
lc_ctype=locale;
166+
if (!lc_collate)
167+
lc_collate=locale;
170168
}
171169

172170
if (encoding)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp