[GENERAL] varchar sort ordering ignore blanks - SOLVED!

2015-06-27 Thread Luca Arzeni
To make a long story short, few years ago I was complaining that the sort order of varchar, in UTF-8, was ignoring blanks, that is that the sort order was: a a A A à b B But, i was in need of a sort order that would place blanks BEFORE the other char, that is I

Re: [GENERAL] varchar sort ordering ignore blanks

2008-01-21 Thread Luca Arzeni
On Sunday 20 January 2008 01:07, Tom Lane wrote: Luca Arzeni [EMAIL PROTECTED] writes: Is there any way to consider blanks meaningfull AND sort properly locale specific vowels ? This isn't a Postgres question, it's a locale question. (If you try, you'll find that sort(1) sorts the same as

Re: [GENERAL] varchar sort ordering ignore blanks

2008-01-20 Thread Luca Arzeni
On Jan 15, 2008 6:37 PM, Tom Lane [EMAIL PROTECTED] wrote: Luca Arzeni [EMAIL PROTECTED] writes: That is: the sort order in postgres 8.1.9 seems to ignore the blank. This is expected behavior in most non-C locales. In all cases I'm using locale LATIN9 during DB creation, but I tested

Re: [GENERAL] varchar sort ordering ignore blanks

2008-01-20 Thread larzeni
On Jan 15, 2008 6:37 PM, Tom Lane [EMAIL PROTECTED] wrote: Luca Arzeni [EMAIL PROTECTED] writes: That is: the sort order in postgres 8.1.9 seems to ignore the blank. This is expected behavior in most non-C locales. Try initdb --locale=C.

Re: [GENERAL] varchar sort ordering ignore blanks

2008-01-19 Thread Tom Lane
Luca Arzeni [EMAIL PROTECTED] writes: Is there any way to consider blanks meaningfull AND sort properly locale specific vowels ? This isn't a Postgres question, it's a locale question. (If you try, you'll find that sort(1) sorts the same as we do in any given locale.) I imagine you could

Re: [GENERAL] varchar sort ordering ignore blanks

2008-01-19 Thread Luca Arzeni
On Jan 15, 2008 6:37 PM, Tom Lane [EMAIL PROTECTED] wrote: Luca Arzeni [EMAIL PROTECTED] writes: That is: the sort order in postgres 8.1.9 seems to ignore the blank. This is expected behavior in most non-C locales. Try initdb --locale=C.

Re: [GENERAL] varchar sort ordering ignore blanks

2008-01-19 Thread Pavel Stehule
Hello, you have to use correct localses for your encoding and country: for czech and utf8 is cs_CZ.UTF8 .. for latin2 is cs_CZ.latin2 etc czech sorting has more exception and it works caa čaa daa cha ... it is well for czech iaa On 20/01/2008, Luca Arzeni [EMAIL PROTECTED] wrote: On Jan

[GENERAL] varchar sort ordering ignore blanks

2008-01-16 Thread Luca Arzeni
Hi there, I have a table with a single column, pk of varchar type The table contains few names, say: A C B In the first two records there is a between the and the following letter A and C while, the third one has a B immediately following the (without blanks). In

Re: [GENERAL] varchar sort ordering ignore blanks

2008-01-16 Thread Csaba Nagy
On Tue, 2008-01-15 at 16:32 +0100, Luca Arzeni wrote: In all cases I'm using locale LATIN9 during DB creation, but I tested also with ASCII, UTF8 and LATIN1 encoding. I guess this has nothing to do with the encoding, but with the collation rules used, which is governed by lc_collate parameter.

[GENERAL] varchar sort ordering ignore blanks

2008-01-15 Thread Luca Arzeni
Hi there, I have a table with a single column, pk of varchar type The table contains few names, say: A C B In the first two records there is a between the and the following letter A and C while, the third one has a B immediately following the (without blanks). In

Re: [GENERAL] varchar sort ordering ignore blanks

2008-01-15 Thread Tom Lane
Luca Arzeni [EMAIL PROTECTED] writes: That is: the sort order in postgres 8.1.9 seems to ignore the blank. This is expected behavior in most non-C locales. In all cases I'm using locale LATIN9 during DB creation, but I tested also with ASCII, UTF8 and LATIN1 encoding. LATIN9 isn't a locale,