Unix Technical Forum

Re: BUG #1972: index error with space character

This is a discussion on Re: BUG #1972: index error with space character within the pgsql Bugs forums, part of the PostgreSQL category; --> Eduardo Soares wrote: > Operating system: Linux Fedora 4 > Description: index error with space character > Details: > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:20 AM
Richard Huxton
 
Posts: n/a
Default Re: BUG #1972: index error with space character

Eduardo Soares wrote:
> Operating system: Linux Fedora 4
> Description: index error with space character
> Details:
>
> In above example the "AZTES Z" should be after the "AZTESA". It happens with
> any encoding type. The DB not see the space character. The index shoulb see
> the space and put "AZTES Z" together with "AZTES". In above list the
> "AZTESA" should be the first.


Sorting order is determined by your locale, and is different from your
encoding. For example, en_GB ignores spaces but C doesn't:

$ LC_COLLATE=en_GB.UTF-8 sort unsorted.txt
aa a
aaaa
aaab
aa b

$ LC_COLLATE=C sort unsorted.txt
aa a
aa b
aaaa
aaab

See "man locale" for details on how to find out what locales are setup
on your machine. See the documentation for details on how to set locale
on a database cluster.

HTH
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:17 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com