From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Maximilian Tyrtania <maximilian(dot)tyrtania(at)onlinehome(dot)de> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Distinct oddity |
Date: | 2009-05-09 14:33:47 |
Message-ID: | 6111.1241879627@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Maximilian Tyrtania <maximilian(dot)tyrtania(at)onlinehome(dot)de> writes:
> FAKDB=# select distinct f.bezeichnung from firmen f order by 1 limit 5
> FAKDB-# ;
> bezeichnung
> -----------------------------------------
> sterreichisches Verkehrsbro 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 Verkehrsbro 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
From | Date | Subject | |
---|---|---|---|
Next Message | Glenn Maynard | 2009-05-09 19:15:51 | Re: Distinct oddity |
Previous Message | Jasen Betts | 2009-05-09 11:05:59 | Re: backup and restore |