Re: [GENERAL] unexpected (to me) sorting order

2015-04-09 Thread Glyn Astill
> From: Scott Marlowe > To: Glyn Astill > Cc: Björn Lundin ; "pgsql-general@postgresql.org" > > Sent: Thursday, 9 April 2015, 13:23 > Subject: Re: [GENERAL] unexpected (to me) sorting order > > On Wed, Apr 8, 2015 at 3:33 AM, Glyn Astill > wrote:

Re: [GENERAL] unexpected (to me) sorting order

2015-04-09 Thread Scott Marlowe
On Wed, Apr 8, 2015 at 3:33 AM, Glyn Astill wrote: > >> From: Björn Lundin >>To: pgsql-general@postgresql.org >>Sent: Wednesday, 8 April 2015, 10:09 >>Subject: [GENERAL] unexpected (to me) sorting order >> >>select * from T_SORT order by NA

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Björn Lundin
On 2015-04-08 13:10, Glyn Astill wrote: >> From: Chris Mair > > > > I think this is down to behaviour changes in glibc, there was a thread a > while ago where somebody replicating via streaming rep between with different > versions of glibc ended up in a bit of a pickle. > > http://www.postg

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Glyn Astill
> From: Chris Mair > To: Björn Lundin ; pgsql-general@postgresql.org > Cc: > Sent: Wednesday, 8 April 2015, 10:36 > Subject: Re: [GENERAL] unexpected (to me) sorting order > > >> select * from T_SORT order by NAME ; >> &g

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Alberto Cabello Sánchez
On Wed, 08 Apr 2015 11:36:01 +0200 Chris Mair wrote: > PostreSQL relies on the OS's C lib. So this kind > of ordering problems depend on the OS' idea about > collations. > > I don't know what's the rationale behin this, > but it looks like Linux ignores the . when doing the sort. Not only '.'.

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Björn Lundin
On 2015-04-08 11:36, Chris Mair wrote: > > I don't know what's the rationale behin this, > but it looks like Linux ignores the . when doing the sort. > Yes, I see that now, and it makes sense Thanks. -- Björn -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Björn Lundin
On 2015-04-08 11:33, Glyn Astill wrote: > The collation of your "bnl" database is utf8, so the "." punctuation > character is seen as a "variable element" and given a lower weighting in > the sort to the rest of the characters. That's just how the collate algorithm works in UTF8. > Try with LC_C

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Chris Mair
> select * from T_SORT order by NAME ; > > rollback; > id |name > + > 1 | FINISH_110_150_1 > 2 | FINISH_110_200_1 > 3 | FINISH_1.10_20.0_3 > 4 | FINISH_1.10_20.0_4 > 5 | FINISH_1.10_30.0_3 > 6 | FINISH_1.10_30.0_4 > 7 | FINISH_120_150_1 > 8 | FINIS

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Glyn Astill
> From: Björn Lundin >To: pgsql-general@postgresql.org >Sent: Wednesday, 8 April 2015, 10:09 >Subject: [GENERAL] unexpected (to me) sorting order > > > >Hi! >below are some commands to >replicate a strange sorting order. > >I do not see why id:s 3-6

[GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Björn Lundin
Hi! below are some commands to replicate a strange sorting order. I do not see why id:s 3-6 are in the middle of the result set. What am I missing? begin; create table T_SORT ( ID bigint default 1 not null , -- Primary Key NAME varchar(100) default ' ' not null ); alter table T_SORT add cons