Re: Distinct oddity

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Distinct oddity
Дата
Msg-id 6111.1241879627@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Distinct oddity  (Maximilian Tyrtania <maximilian.tyrtania@onlinehome.de>)
Ответы Re: Distinct oddity
Re: Distinct oddity
Список pgsql-sql
Maximilian Tyrtania <maximilian.tyrtania@onlinehome.de> writes:
> FAKDB=# select distinct f.bezeichnung from firmen f order by 1 limit 5
> FAKDB-# ;
>                bezeichnung
> -----------------------------------------
>  �sterreichisches Verkehrsb�ro AG
>  \x01Assistenz
>  \x10Frohstoff Design & Textilveredelung
>  "1. Mittelschule ""Am Kupferberg"""
> (5 rows)


> FAKDB=# select distinct f.bezeichnung||'e' from firmen f order by 1 limit 5
> ;
>                  ?column?
> ------------------------------------------
>  �sterreich/Welt (Ltg.)e
>  �sterreichisches Verkehrsb�ro AGe
>  \x01Assistenze
>  \x10Frohstoff Design & Textilveredelunge
>  "1. Mittelschule ""Am Kupferberg"""e
> (5 rows)


> Aha, the "�sterreich/Welt (Ltg.)"-entry is missing in the 1st query. So that
> does smell like a locale problem.

That only proves that adding the 'e' changes the sort order, which is
completely unsurprising for any non-C locale.  What you need to do is
dump out the *entire* results of the DISTINCT queries and look for the
unmatched lines.  I'd try dumping to two files, stripping the 'e' with
sed, and then sort/diff.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: backup and restore
Следующее
От: Glenn Maynard
Дата:
Сообщение: Re: Distinct oddity