谁能解释一下下面的矛盾吗?
select 'b.0'<'b00.0';
?column?
----------
t
但是
select 'b.g'<'b00.g';
?column?
----------
f
最佳答案
这是一个collation issue 。尝试一下
select '.0' < '00', '.9' < '00', '.9' < '00' collate "C";
?column? | ?column? | ?column?
----------+----------+----------
t | f | t
关于postgresql - Postgres 字符串比较特性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21360747/