From: Thorbjörn Eriksson <thorbjorn.eriksson@ec.se>
To: tgl@sss.pgh.pa.us
Cc: pgsql-sql@postgresql.org
Subject: Re: Stripping white-space in SELECT statments
Date: Mon, 23 Sep 2002 16:28:41 +0200
Message-ID: <MFEPJLNKECPAPFDGGEIMMEOJCBAA.thorbjorn.eriksson@ec.se> (raw)
In-Reply-To: <25711.1032445912@sss.pgh.pa.us>
Thank's Tom Lane & Stephan Szabo for pointing out the problem to me.
After some testing it turned out that the swedish locale, 'sv_SE', doesn't
handle sorting spaces as expected, which probably made the SELECT fail. On
the other hand, if I use the 'C' locale, the SELECT works but not the sort
order of the swedish characters 'åäö'.
Does anyone know a solution to this problem, or could give me a hint?
> -----Ursprungligt meddelande-----
> Från: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Skickat: den 19 september 2002 16:32
> Till: thorbjorn.eriksson@ec.se
> Kopia: pgsql-sql@postgresql.org
> Ämne: Re: [SQL] Stripping white-space in SELECT statments
>
>
> =?iso-8859-1?Q?Thorbj=F6rn_Eriksson?= <thorbjorn.eriksson@ec.se> writes:
> > I've encountered a strange behavior in postgres 7.2.1 regarding how psql
> > handles strings ending with space characters.
>
> Perhaps you are running in a non-C locale? A lot of locales have
> sorting rules that are pretty weird about whitespace.
>
> > The reason that we don't use 'LIKE 201901 %' is that it don't use
> > the index
>
> This suggests strongly that you are in a non-C locale. Your external
> software seems to be emulating the standard LIKE-to-index optimization;
> which as you are now discovering, does not work with non-C sorting
> rules (so the system doesn't try to apply it).
>
> regards, tom lane
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: thorbjorn.eriksson@ec.se, tgl@sss.pgh.pa.us
Subject: Re: Stripping white-space in SELECT statments
In-Reply-To: <MFEPJLNKECPAPFDGGEIMMEOJCBAA.thorbjorn.eriksson@ec.se>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox