linux - Is there any way to have PostgreSQL not collapse punctuation and spaces when collating using a language? -


from understand, postgresql delegates collation strcoll() function of underlying operating system, , apparently (if not all) linux installations take advantage of fact punctuation , spaces can optionally collapsed when collating in utf-8.

for example, have database in postres 9.2 on centos 6.4

encoding='utf8' lc_collate='en_us.utf8' lc_ctype='en_us.utf8' 

and run query

select * (values('abc'),('abc'),('abc'),('...abc'),('a bc')) x order 1; 

the results are

abc bc abc ...abc abc 

mac os x seems honor punctuation , spaces uses posix/c style sort. similar database same settings on os x returns

...abc abc abc bc abc 

regardless of operating system, expect proper collation return (and icu demo project shows)

...abc bc abc abc abc 

is there way postgres installs on operating system, particularly linux, observe proper collation in style of icu?

as you've noted, postgres relies on operating system provide collation, , there's little postgres can how things collated beyond hooking directly icu.

doing has been recurring discussion topic on years, not trivial task:

http://wiki.postgresql.org/wiki/todo:icu


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -