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
Comments
Post a Comment