Lists: | pgsql-hackers |
---|
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | initdb ignores invalid locale names |
Date: | 2006-09-22 18:15:32 |
Message-ID: | 200609222015.33793.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
When initdb is given an invalid (possibly mistyped) locale name, it just
prints a warning and proceeds with the default locale from the
environment. Someone already wondered about this before:
/* should we exit here? */
if (!ret)
fprintf(stderr, _("%s: invalid locale name \"%s\"\n"), progname,
locale);
return ret;
I obviously think we should. Why shouldn't we?
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: initdb ignores invalid locale names |
Date: | 2006-09-22 19:18:50 |
Message-ID: | 9676.1158952730@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> When initdb is given an invalid (possibly mistyped) locale name, it just
> prints a warning and proceeds with the default locale from the
> environment. Someone already wondered about this before:
> /* should we exit here? */
> if (!ret)
> fprintf(stderr, _("%s: invalid locale name \"%s\"\n"), progname,
> locale);
> I obviously think we should. Why shouldn't we?
That would make it impossible to install at all on a machine with broken
locale support, which seems a bit of an overreaction, especially for the
noncritical locale items like LC_MESSAGES (which also happens to be the
one that fails most often). I could go with erroring for LC_COLLATE and
LC_CTYPE, but I'd prefer to see us fall back to "C" for any of the other
LC_ items that fail. Those guys are easy to fix after the fact, if the
user cares enough (or at all).
BTW, it would also be a good idea if the message specified which LC_
item we failed to set.
regards, tom lane
From: | "Greg Sabino Mullane" <greg(at)turnstep(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: initdb ignores invalid locale names |
Date: | 2006-09-22 21:07:54 |
Message-ID: | 9464ce682904d4d8243ec978b22921f1@biglumber.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> When initdb is given an invalid (possibly mistyped) locale name, it just
> ...
> /* should we exit here? */
> ...
> I obviously think we should. Why shouldn't we?
+1. This has been on my long-term, low-priority todo list for a while.
Raising the issue that it, not necessarily fixing it. I gotta get more
organized... :)
- --
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation
PGP Key: 0x14964AC8 200609221704
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFFFFAKvJuQZxSWSsgRAmSzAJ0Uz4RqQEBvsn4S3uGwbslfw/j8+QCg/uzd
FFa7vbTh6YnF2gsdSxUCdzM=
=tc4X
-----END PGP SIGNATURE-----
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Greg Sabino Mullane <greg(at)turnstep(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: initdb ignores invalid locale names |
Date: | 2006-10-02 21:42:29 |
Message-ID: | 200610022142.k92LgTT27231@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Is this a TODO item?
---------------------------------------------------------------------------
Greg Sabino Mullane wrote:
[ There is text before PGP section. ]
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> > When initdb is given an invalid (possibly mistyped) locale name, it just
> > ...
> > /* should we exit here? */
> > ...
> > I obviously think we should. Why shouldn't we?
>
> +1. This has been on my long-term, low-priority todo list for a while.
> Raising the issue that it, not necessarily fixing it. I gotta get more
> organized... :)
>
> - --
> Greg Sabino Mullane greg(at)turnstep(dot)com
> End Point Corporation
> PGP Key: 0x14964AC8 200609221704
> http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFFFFAKvJuQZxSWSsgRAmSzAJ0Uz4RqQEBvsn4S3uGwbslfw/j8+QCg/uzd
> FFa7vbTh6YnF2gsdSxUCdzM=
> =tc4X
> -----END PGP SIGNATURE-----
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +