Re: [SQL] Strange behavior - Mailing list pgsql-sql

From Christophe Labouisse
Subject Re: [SQL] Strange behavior
Date
Msg-id m3eml6ob1k.fsf@gabuzo.meunet
Whole thread Raw
In response to Re: [SQL] Strange behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [SQL] Strange behavior
List pgsql-sql
Tom Lane <tgl@sss.pgh.pa.us> writes:

> > select crit_url from crit where crit_url like 'films/%' order by crit_url;
> > [ gives wrong results, whereas this gives right results: ]
> > select crit_url from crit where crit_url like '%films/%' order by crit_url;
>
> What locale and/or MULTIBYTE setting are you using?

fr_FR

>
> There is a hack in the parser that tries to transform the first of these
> into this:
>
> select crit_url from crit where crit_url like 'films/%'
> AND crit_url >= 'films/' AND crit_url <= 'films/\377'
> order by crit_url;

Well I guess that's it since \377 in fr_FR is ÿ (ydierisis).

Christophe Labouisse : Cinéma, typographie, Unix
christophe.labouisse@dial.oleane.com http://www.multimania.com/gabuzo/
Le cinéma en Lumière : http://www.lumiere.org/

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Strange behavior
Next
From: Nuchanard Chiannilkulchai
Date:
Subject: Re: [SQL] substring