View Single Post

   
  #2 (permalink)  
Old 04-10-2008, 09:21 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #1996: DISTINCT fails with national character varying

"Ludmil Tinkov" <ludmil@fyrex.com> writes:
> select distinct name from depression


> --the last statement returns only a single row
> --namely: Ана
> --it should return 4 rows!


This has been seen to happen when you select a database encoding that
does not match the encoding expected by the postmaster's LC_CTYPE locale
setting. It's really a bug in the locale definitions, if you ask me,
but good luck getting the glibc guys to change those :-(. In the
meantime, make sure your locale and encoding agree.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Reply With Quote