> Hmmm, snipped from your reply was the explain plan from the query
where it
> was clear you were using two different character data types: bpchat
and
> text. That, alone, may have been a problem.
> Looking at your defaults, did you do:
> initdb --locale=C somepath

I reran initdb --locale=C yesterday and that fixed the problem.  Since I
am doing the nightly win32 builds I run initdb each night around 1am and
I missed the locale warning.  I had a feeling it was something like
this.  The part I don't understand is why psql was saying the locale
(show lc_ctype) was 'C' when pg_controldata was not.  This, along with
recent code revisions tricked me for a while (not to mention the default
locale being changed).

Here is what I think happened (this might be a bug, might not):  Each
night I run initdb but I use a special postgresql.conf which is
optimized for quick data loading.  This is copied over the default one
after the server is started.  This contains the locale information which
is 'initialized by initdb'.  These were still 'C' because this file was
generated before the default locale was changed.  psql shows this
information when you ask it for the locale info even if it is incorrect.
The real settings are of course built into the database itself.  This
stuff is all new to me, I've never really had to deal with locales
before.

> Personally, I think, if I do not specify a locale, I don't want a
specific
> locale. Period. I haven't been paying too close attention to the
hackers
> list to say when this happened, but it bit me a couple times.

I now accept this as dogma :)

Merlin

Wed, 2 Jun 2004 08:07:23 -0400
"Merlin Moncure" <merlin.moncure@rcsonline.com>
Re: [pgsql-hackers-win32] select like...not using index
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
> Here is what I think happened (this might be a bug, might not):  Each
> night I run initdb but I use a special postgresql.conf which is
> optimized for quick data loading.  This is copied over the default one
> after the server is started.  This contains the locale information which
> is 'initialized by initdb'.  These were still 'C' because this file was
> generated before the default locale was changed.  psql shows this
> information when you ask it for the locale info even if it is
> incorrect.

I don't believe this for a minute.  lc_ctype and lc_collate can *not*
be set from postgresql.conf.  Try it.

			regards, tom lane

Thu, 03 Jun 2004 00:18:24 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [pgsql-hackers-win32] select like...not using index 