Re: 'like' refuses to use an index??? - Mailing list pgsql-general

Mike Nolan <nolan@gw.tssi.com> writes:
> However, I think RH always sets the LANG environmental variable, so
> that's going to be picked up by initdb, which means that the C locale
> will NOT be used unless specifically asked for.  Other OS packages may
> also force the choice of a default LANG value.

Yeah.  There have been some discussions on pgsql-hackers about
defaulting to C locale instead of honoring LANG, but we haven't done
anything.

> Dumb question of the hour:  How does one find out what locale a
> DB is initialized in?

In 7.4, you can just "show lc_collate".  In prior versions you need
to use pg_controldata to see what's stored in pg_control.

BTW, 7.4 also has a specialized index opclass that can be used to create
LIKE-compatible indexes even if you are using a non-C locale.

            regards, tom lane

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Is my MySQL Gaining ?
Next
From: "Keith C. Perry"
Date:
Subject: Re: 'like' refuses to use an index???