Peter Eisentraut wrote:
> Bruce Momjian writes:
> 
> > How are people going to know to use these special LIKE indexes?
> 
> The same way they presumably find out about anything else: RTFM.  A couple
> of more cross-references and index entries need to be added, though.

Well, this isn't one of those, "How do I do X" but rather something they
will only know they need if they wonder why their LIKE queries are slow
--- that isn't going to be obvious to too many people.  An FAQ may be
required for this --- fortunately we already have an item for indexes.

That is one thing I liked about the initdb mention --- it clearly told
them to watch out for something they might not have been looking for.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Wed, 4 Jun 2003 17:51:34 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: default locale considered harmful? (was Re: [GENERAL]
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> That is one thing I liked about the initdb mention --- it clearly told
> them to watch out for something they might not have been looking for.

Only if they read the message, though.  People who are running RPM
installations probably never get to see what initdb has to say ...
so I can't put much faith in the usefulness of warnings emitted by
initdb.

			regards, tom lane

Wed, 04 Jun 2003 23:05:03 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: default locale considered harmful? (was Re: [GENERAL] 
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > That is one thing I liked about the initdb mention --- it clearly told
> > them to watch out for something they might not have been looking for.
> 
> Only if they read the message, though.  People who are running RPM
> installations probably never get to see what initdb has to say ...
> so I can't put much faith in the usefulness of warnings emitted by
> initdb.

True, but for people who _do_ see initdb output, is it helpful, and what
other places can we put it?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Wed, 4 Jun 2003 23:16:43 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: default locale considered harmful? (was Re: [GENERAL]
On Wed, Jun 04, 2003 at 11:05:03PM -0400, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > That is one thing I liked about the initdb mention --- it clearly told
> > them to watch out for something they might not have been looking for.
> 
> Only if they read the message, though.  People who are running RPM
> installations probably never get to see what initdb has to say ...
> so I can't put much faith in the usefulness of warnings emitted by
> initdb.

It'd be nice if the RPM installation mailed initdb's messages to someone
(root@localhost maybe).  It's not impossible, and while it's likely that
RedHat would remove the feature, at least PGDG's RPM would do it.  Same
for DEBs and other binary packages...

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Nunca confiarï¿½ en un traidor.  Ni siquiera si el traidor lo he creado yo"
(Barï¿½n Vladimir Harkonnen)

Thu, 5 Jun 2003 01:25:37 -0400
Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: default locale considered harmful? (was Re: [GENERAL]
On Wed, 4 Jun 2003, Tom Lane wrote:

> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > That is one thing I liked about the initdb mention --- it clearly told
> > them to watch out for something they might not have been looking for.
> 
> Only if they read the message, though.  People who are running RPM
> installations probably never get to see what initdb has to say ...
> so I can't put much faith in the usefulness of warnings emitted by
> initdb.
> 

Yes, I mentioned this when this thread was going a few weeks ago. I only caught
the locale setting being wrong on a system before it went into production
because I happened to install on another system and noticed the message. I then
had to ask the hosting company's SA to first check and then re-initdb. I was
even sat watching/directing what he was doing and missed it. He was using
Redhat with RPMs I was doing it properly from source.

Those RPMs are dangerous, they turn you mind off.

I voted for setting 'C' by default.


-- 
Nigel J. Andrews


Thu, 5 Jun 2003 07:57:32 +0100 (BST)
"Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: default locale considered harmful? (was Re: [GENERAL]
On Thu, 5 Jun 2003, Nigel J. Andrews wrote:

> On Wed, 4 Jun 2003, Tom Lane wrote:
> 
> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > That is one thing I liked about the initdb mention --- it clearly told
> > > them to watch out for something they might not have been looking for.
> > 
> > Only if they read the message, though.  People who are running RPM
> > installations probably never get to see what initdb has to say ...
> > so I can't put much faith in the usefulness of warnings emitted by
> > initdb.
> > 
> 
> Yes, I mentioned this when this thread was going a few weeks ago. I only caught
> the locale setting being wrong on a system before it went into production
> because I happened to install on another system and noticed the message. I then
> had to ask the hosting company's SA to first check and then re-initdb. I was
> even sat watching/directing what he was doing and missed it. He was using
> Redhat with RPMs I was doing it properly from source.
> 
> Those RPMs are dangerous, they turn you mind off.
> 
> I voted for setting 'C' by default.

Everything Nigel just wrote plus one thing.

If it comes down to it, we could always require a --locale setting and 
refuse to initdb without it.  That way, whether it's in an RPM or from 
source, somebody somewhere along the line has to choose something.

Or would that break RPM / automated installs in too nasty a way?


Thu, 5 Jun 2003 09:44:21 -0600 (MDT)
"scott.marlowe" <scott.marlowe@ihs.com>
Re: default locale considered harmful? (was Re: [GENERAL]
scott.marlowe writes:

> If it comes down to it, we could always require a --locale setting and
> refuse to initdb without it.  That way, whether it's in an RPM or from
> source, somebody somewhere along the line has to choose something.

By default, you choose when you install or configure your operating
system.  In most cases, the region where you install your operating system
and the region where you run your database is the same, so equating these
settings by default is reasonable.

-- 
Peter Eisentraut   peter_e@gmx.net


Thu, 5 Jun 2003 23:15:18 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: default locale considered harmful? (was Re: [GENERAL]
On Thu, 5 Jun 2003, Peter Eisentraut wrote:

> scott.marlowe writes:
> 
> > If it comes down to it, we could always require a --locale setting and
> > refuse to initdb without it.  That way, whether it's in an RPM or from
> > source, somebody somewhere along the line has to choose something.
> 
> By default, you choose when you install or configure your operating
> system.  In most cases, the region where you install your operating system
> and the region where you run your database is the same, so equating these
> settings by default is reasonable.

But it's not that simple.  If one could flip a switch and change a 
postgresql installation from one locale to another, then hey, no big deal.  
If indexes on text worked right in other locales it would be no big deal.  

If you don't choose locale=C with doing initdb then you 
have to backup the whole database, reinitdb, and restore it in order to 
switch to it.

If the postgresql engine could use indexes well in all 
locales then it would be reasonable to pick up the environmental locale.  
As long as locale C is the only one that can use indexes on text, it's not 
reasonable to use the locale of the environment without knowing what the 
user really wants to do with the database.

Especially since most of the folks I know who download it are going to 
prefer a locale of C to en_US or whatnot, since they'll likely want fast 
indexed access on text types.

I would at least suggest that certain locales default to be coerced to C 
if the user doesn't pick one.


Thu, 5 Jun 2003 15:18:04 -0600 (MDT)
"scott.marlowe" <scott.marlowe@ihs.com>
Re: default locale considered harmful? (was Re: [GENERAL]
On Thu, Jun 05, 2003 at 09:44:21AM -0600, scott.marlowe wrote:
> On Thu, 5 Jun 2003, Nigel J. Andrews wrote:

> Everything Nigel just wrote plus one thing.
> 
> If it comes down to it, we could always require a --locale setting and 
> refuse to initdb without it.  That way, whether it's in an RPM or from 
> source, somebody somewhere along the line has to choose something.

Yeah, that way the RPM guys would put the --locale taking the locale
from the environment and you're back to ground zero.

There's no point in forcing things down the throat of users using this
kind of mechanisms, because someone is going to automate the thing 
along the way.  What is needed is a way to make the user aware of his
system's configuration.

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)

Thu, 5 Jun 2003 17:53:15 -0400
Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>
Re: default locale considered harmful? (was Re: [GENERAL]
On Thu, 5 Jun 2003, Alvaro Herrera Munoz wrote:

> On Thu, Jun 05, 2003 at 09:44:21AM -0600, scott.marlowe wrote:
> > On Thu, 5 Jun 2003, Nigel J. Andrews wrote:
> 
> > Everything Nigel just wrote plus one thing.
> > 
> > If it comes down to it, we could always require a --locale setting and 
> > refuse to initdb without it.  That way, whether it's in an RPM or from 
> > source, somebody somewhere along the line has to choose something.
> 
> Yeah, that way the RPM guys would put the --locale taking the locale
> from the environment and you're back to ground zero.
> 
> There's no point in forcing things down the throat of users using this
> kind of mechanisms, because someone is going to automate the thing 
> along the way.  What is needed is a way to make the user aware of his
> system's configuration.

But initdb IS different since it takes so much effort to change locales 
once you've set up a cluster.

Unless the other locales can offer similar performance to the C locale, I 
would suggest that we make the C locale the default.  IF they need 
something else they can change it after initdb. 

If you're an old time user, you know how to set locale, and the 
implications of a non-C locale, so a default of C is no big deal, and 
you're likely to be looking at initdb to see the message telling you it's 
using C.

If you're a beginner you likely need or want a locale of C, but don't know 
it, and don't know that you can't change it without reinitdbing.

My only concern with going with a default locale of C is if it causes a 
problem with data integrity (i.e. constraints that only behave right in a 
certain locale).


Thu, 5 Jun 2003 15:59:23 -0600 (MDT)
"scott.marlowe" <scott.marlowe@ihs.com>
Re: default locale considered harmful? (was Re: [GENERAL]
scott.marlowe writes:

> If indexes on text worked right in other locales it would be no big deal.

They will in version 7.4, so all these concerns about trading off locale
use vs. performance will become obsolete.

-- 
Peter Eisentraut   peter_e@gmx.net


Fri, 6 Jun 2003 16:19:50 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: default locale considered harmful? (was Re: [GENERAL]
On Fri, 6 Jun 2003, Peter Eisentraut wrote:

> scott.marlowe writes:
> 
> > If indexes on text worked right in other locales it would be no big deal.
> 
> They will in version 7.4, so all these concerns about trading off locale
> use vs. performance will become obsolete.

Oh!  I thought there were still issues that couldn't be worked out on that 
front.  In that case, heck yeah, set the locale on initdb to the current 
system locale.  sweet.


Fri, 6 Jun 2003 08:59:43 -0600 (MDT)
"scott.marlowe" <scott.marlowe@ihs.com>
Re: default locale considered harmful? (was Re: [GENERAL]