Postgres Strings比较特殊

时间:2014-01-26 07:08:12

标签: postgresql

有人可以解释以下矛盾吗?

select 'b.0'<'b00.0';
 ?column?
----------
 t

select 'b.g'<'b00.g';
 ?column?
----------
 f

1 个答案:

答案 0 :(得分:2)

那是collation issue。尝试

select '.0' < '00', '.9' < '00', '.9' < '00' collate "C";
 ?column? | ?column? | ?column? 
----------+----------+----------
 t        | f        | t

http://wiki.postgresql.org/wiki/Todo:ICU