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

From Tom Lane
Subject Re: [SQL] Strange behavior
Date
Msg-id 8381.925223461@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] Strange behavior  (Christophe Labouisse <labouiss@cybercable.fr>)
List pgsql-sql
Christophe Labouisse <labouiss@cybercable.fr> writes:
>> 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).

And I suppose that sorts before, or the same as, plain y?  Oops.

As a temporary measure you could rebuild with USE_LOCALE turned on;
the parser code is set up not to generate the <= clause if that's
defined.  But we need a better solution.
        regards, tom lane


pgsql-sql by date:

Previous
From: Brook Milligan
Date:
Subject: rules help
Next
From: Tom Lane
Date:
Subject: Re: [SQL] substring