Re: initdb with lc-collate=C

From: Scot Kreienkamp <SKreien(at)la-z-boy(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, "Postgres General (pgsql-general(at)postgresql(dot)org)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: initdb with lc-collate=C
Date: 2011-12-13 16:58:00
Message-ID: 17082AAFC33A934082836458CB5349430D3312@MONEXCH01.na.lzb.hq
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Tom. I had tried it with SU before I mailed the list and it didn't work. When I tried it again, I noticed that I typed a lower case C which it wouldn't accept. I tried it again with an upper case C and it worked. That's probably why my first attempt with SU failed and I didn't catch the error message before it rolled off the screen.

The initdb on the initscript used to honor the extra switches. That's how I've been doing it since 8.2. I'll run it with SU from now on.

Thanks!

Scot Kreienkamp
Senior Systems Engineer
skreien(at)la-z-boy(dot)com

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: Tuesday, December 13, 2011 12:00 AM
To: Scot Kreienkamp
Cc: Adrian Klaver; Postgres General (pgsql-general(at)postgresql(dot)org)
Subject: Re: [GENERAL] initdb with lc-collate=C

Scot Kreienkamp <SKreien(at)la-z-boy(dot)com> writes:
> There wasn't any output from the initdb other than OK.
> [root(at)dvrv5030 9.1]# /etc/init.d/postgresql-9.1 initdb --lc-collate=C
> Initializing database: [ OK ]

Um. This isn't running initdb: this is running the package's initscript
and hoping it will pass the switch you supplied through to initdb.
If it doesn't, you'll get whatever locale is default in root's environment.

I gather from the package name that you're using Devrim's packages not
mine, so I don't know for sure what will happen here ... but I'm pretty
sure that that extra switch would *not* be honored in the Red Hat/Fedora
initscripts.

My suggestion for this would be to "su - postgres" and then run initdb
directly.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-12-13 16:59:13 Re: order of (escaped) characters in regex range
Previous Message David Johnston 2011-12-13 16:53:06 Re: order of (escaped) characters in regex range