postgresql - relative position of digits and ':' in postgres collating sequence -


say have table 't1' string column 'name'. , have names 'n1','n2','n9' , 'n:'. if do

select * t1 orderby name asc 

i expect

n1 n2 n9 n: 

given ':' comes after '9' in ascii, instead, get

n: n1 n2 n9 

which surprise. there need 'use ascii collating sequence basic ascii chars'

from experience, collation issue

select *    t1 order name collate "posix"; 

this list of exapmle collations in case collation have listed, sql_latin1_general_cp850_bin not work

https://www.postgresql.org/docs/9.1/static/collation.html


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -