Re: select fails on indexed varchars. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: select fails on indexed varchars.
Date
Msg-id 13678.980555718@sss.pgh.pa.us
Whole thread Raw
In response to Re: select fails on indexed varchars.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: select fails on indexed varchars.
List pgsql-bugs
Alex Krohn <alex@gossamer-threads.com> writes:
> I added to the startup file:
> LANG=C
> LC_CTYPE=C
> LC_NUMERIC=C
> LC_TIME=C
> LC_COLLATE=C
> LC_MONETARY=C
> LC_MESSAGES=C
> LC_ALL=C

Seems reasonable.  It's possible you needed "export" commands in there
too, but I wouldn't have thought so (anything coming in from the outer
environment should be exported already).

> After this, my create test and select still produced the same error. Ugh.

Hm, maybe I'm barking up the wrong tree.  Let's try a direct test.
What do you get from

    select 'a_b'::text < 'ac'::text;

    select 'A_B'::text < 'ac'::text;

On my machine, these produce 't' in C locale, but 'f' in en_US locale.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Robert B. Easter"
Date:
Subject: Re: BUG in postgres mathematic
Next
From: Barry Lind
Date:
Subject: Re: JDBC buggy in 7.1beta3