Re: per-database locale: createdb switches

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: per-database locale: createdb switches
Date: 2008-11-06 18:54:40
Message-ID: 20081106185440.GP5520@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
> > Alvaro Herrera wrote:
> >> It seems awkward; why can't we just have a
> >> single --locale switch that selects both settings at once?
>
> > Sometimes it's needed to use C-collate with non-C-ctype. But for most
> > users it's enough just a locale switch. What about
> > [--locale=X|--lc-collate=X --lc-ctype=X] option?
>
> Seems to me there's one there already.

You're thinking of initdb maybe? I'm talking about createdb.

$ LC_ALL=C createdb --version
createdb (PostgreSQL) 8.4devel

$ LC_ALL=C createdb --help
createdb creates a PostgreSQL database.

Usage:
createdb [OPTION]... [DBNAME] [DESCRIPTION]

Options:
-D, --tablespace=TABLESPACE default tablespace for the database
-E, --encoding=ENCODING encoding for the database
--lc-collate=LOCALE LC_COLLATE setting for the database
--lc-ctype=LOCALE LC_CTYPE setting for the database
-O, --owner=OWNER database user to own the new database
-T, --template=TEMPLATE template database to copy
-e, --echo show the commands being sent to the server
--help show this help, then exit
--version output version information, then exit

Connection options:
-h, --host=HOSTNAME database server host or socket directory
-p, --port=PORT database server port
-U, --username=USERNAME user name to connect as
-W, --password force password prompt

By default, a database with the same name as the current user is created.

Report bugs to <pgsql-bugs(at)postgresql(dot)org>.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-06 19:00:50 Re: per-database locale: createdb switches
Previous Message Tom Lane 2008-11-06 18:50:09 Re: per-database locale: createdb switches