Skip site navigation (1) Skip section navigation (2)

Re: UTF-8 and LIKE vs =

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: David Wheeler <david(at)kineticode(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>,"pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: UTF-8 and LIKE vs =
Date: 2004-08-23 21:31:26
Message-ID: 1093296686.1700.243.camel@camel (view raw or flat)
Thread:
Lists: pgsql-general
On Mon, 2004-08-23 at 16:43, David Wheeler wrote:
> On Aug 23, 2004, at 1:22 PM, Peter Eisentraut wrote:
> 
> > Because LIKE does a character-by-character matching and = uses the
> > operating system locale, which could do anything.  If you set the
> > locale to C, you should get matching results.  Which one is "better"
> > depends on the semantics of the language, which I cannot judge here.
> 
> Thanks. So I need to set the locale to C and then LIKE will work 
> properly? How do I go about doing that? I can see these options:
> 
> LC_COLLATE
> String sort order
> 
> LC_CTYPE
> Character classification (What is a letter? The upper-case equivalent?)
> 
> LC_MESSAGES
> Language of messages
> 
> LC_MONETARY
> Formatting of currency amounts
> 
> LC_NUMERIC
> Formatting of numbers
> 
> LC_TIME
> Formatting of dates and times
> 
> Is one of these the one I need to set?
> 

initdb is your friend. (well, not really, but that's where your headed)

Robert Treat
-- 
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


In response to

Responses

pgsql-general by date

Next:From: David WheelerDate: 2004-08-23 21:46:40
Subject: Re: UTF-8 and LIKE vs =
Previous:From: Bruce MomjianDate: 2004-08-23 21:25:53
Subject: Re: Unsupported 3rd-party solutions (Was: Few questions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group