Thread: some tables unicode, some ascii?

some tables unicode, some ascii?

From
Gene
Date:
I'm having some issues with being able to use indexes on certain
columns/queries because of the unicode encoding. This table doesn't
really need to use unicode and contains only valid ascii-range
characters but since I have one other table that needs unicode data
the whole database is inited to UTF8 en_US. Is there a way to get the
benefit of using ascii and the "C" locale for index usage on certain
tables and unicode encoding on others (where peformance is not an
issue)?  In particular the planner will not use index with Unicode on
"like '123%' " queries.

Thanks,
gene

Re: some tables unicode, some ascii?

From
Michael Fuhr
Date:
On Sat, Feb 24, 2007 at 11:35:10PM -0500, Gene wrote:
> Is there a way to get the benefit of using ascii and the "C" locale
> for index usage on certain tables and unicode encoding on others
> (where peformance is not an issue)?  In particular the planner will
> not use index with Unicode on "like '123%' " queries.

See "Operator Classes" in the "Indexes" chapter of the documentation.

http://www.postgresql.org/docs/8.2/interactive/indexes-opclass.html

--
Michael Fuhr